{"id":23061575,"url":"https://github.com/syncfusionexamples/integrate-.net-maui-maps-with-android-native-embedding","last_synced_at":"2026-04-20T09:34:42.040Z","repository":{"id":234148834,"uuid":"786880191","full_name":"SyncfusionExamples/Integrate-.NET-MAUI-Maps-with-android-native-embedding","owner":"SyncfusionExamples","description":"This repository contains a sample that explain how to integrate .NET MAUI SfMaps with android native embedding.","archived":false,"fork":false,"pushed_at":"2025-09-13T10:27:19.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-23T10:48:11.531Z","etag":null,"topics":["android","data-visualization","dotnet","map","maui","native-embedding","sfmaps"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SyncfusionExamples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-15T13:30:47.000Z","updated_at":"2025-09-13T10:27:23.000Z","dependencies_parsed_at":"2024-04-18T10:23:14.866Z","dependency_job_id":"941d466c-2d8a-4027-9120-765dcea7470b","html_url":"https://github.com/SyncfusionExamples/Integrate-.NET-MAUI-Maps-with-android-native-embedding","commit_stats":null,"previous_names":["syncfusionexamples/integrate-.net-maui-maps-with-android-native-embedding"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SyncfusionExamples/Integrate-.NET-MAUI-Maps-with-android-native-embedding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FIntegrate-.NET-MAUI-Maps-with-android-native-embedding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FIntegrate-.NET-MAUI-Maps-with-android-native-embedding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FIntegrate-.NET-MAUI-Maps-with-android-native-embedding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FIntegrate-.NET-MAUI-Maps-with-android-native-embedding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SyncfusionExamples","download_url":"https://codeload.github.com/SyncfusionExamples/Integrate-.NET-MAUI-Maps-with-android-native-embedding/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FIntegrate-.NET-MAUI-Maps-with-android-native-embedding/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32041621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","data-visualization","dotnet","map","maui","native-embedding","sfmaps"],"created_at":"2024-12-16T03:17:51.846Z","updated_at":"2026-04-20T09:34:42.011Z","avatar_url":"https://github.com/SyncfusionExamples.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to integrate .NET MAUI Maps with android native embedding application?\nIn this article, you will learn how to create a [.NET MAUI Maps](https://www.syncfusion.com/maui-controls/maui-maps) native embedded Android application by following the step by step process explained below.\n\n**Step 1:**\nCreate a .NET Android application and install the [Syncfusion.Maui.Maps](https://www.nuget.org/packages/Syncfusion.Maui.Maps) nuget package using the [nuget.org](https://www.nuget.org/).\n\n**Step 2:**\nIn the project file of the native application, add the tag `\u003cUseMaui\u003etrue\u003c/UseMaui\u003e` to enable the .NET MAUI support as demonstrated below.\n\n**[XML]:** \n ```xml\n\u003cPropertyGroup\u003e\n\t\u003cNullable\u003eenable\u003c/Nullable\u003e\n\t\u003cImplicitUsings\u003eenable\u003c/ImplicitUsings\u003e\n\t\u003cUseMaui\u003etrue\u003c/UseMaui\u003e\n\u003c/PropertyGroup\u003e\n ```\n \n**Step 3:**\nInitialize .NET MAUI in the native app project by creating a **MauiAppBuilder** object and using the **UseMauiEmbedding** function. Then, use the **Build()** method on the **MauiAppBuilder** object to build a **MauiApp** object. Finally, create a **MauiContext** object from the MauiApp object to convert .NET MAUI controls to native types.\n\n**[C#]:** \n ```csharp\nMauiContext? _mauiContext;\nprotected override void OnCreate(Bundle? savedInstanceState)\n{\n    base.OnCreate(savedInstanceState);\n    MauiAppBuilder builder = MauiApp.CreateBuilder();\n    builder.UseMauiEmbedding\u003cMicrosoft.Maui.Controls.Application\u003e();\n    builder.ConfigureSyncfusionCore();\n    MauiApp mauiApp = builder.Build();\n    _mauiContext = new MauiContext(mauiApp.Services, this);\n}\n ```\n \n**Step 4:**\nCreate a new instance for the SfMaps control, add a shape layer to it, and set the source of the map shapes using the [ShapesSource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Maps.MapShapeLayer.html#Syncfusion_Maui_Maps_MapShapeLayer_ShapesSource) property of the [MapShapeLayer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Maps.MapShapeLayer.html).\n \n**[C#]:** \n ```csharp\nprotected override void OnCreate(Bundle? savedInstanceState)\n{\n   ...\n   SfMaps map = new SfMaps();\n   MapShapeLayer layer = new MapShapeLayer();\n   layer.ShapesSource = MapSource.FromUri(new Uri(\"https://cdn.syncfusion.com/maps/map-data/world-map.json\"));\n   map.Layer = layer;\n   ...\n}\n ```\n \n**Step 5:**\nConvert the Maps control to a platform-specific view for the .NET MAUI framework and set this view as the content view for the current Android activity.\n\n**[C#]:** \n ```csharp\nprotected override void OnCreate(Bundle? savedInstanceState)\n{\n   Android.Views.View view = map.ToPlatform(_mauiContext);\n\n   // Set our view from the \"main\" layout resource\n   SetContentView(view);\n}\n ```\n\n**Output:**\n\n ![Map-Android-Native-Embedding.png](https://syncfusion.bolddesk.com/kb/agent/attachment/article/15039/inline?token=eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjIxMjk0Iiwib3JnaWQiOiIzIiwiaXNzIjoic3luY2Z1c2lvbi5ib2xkZGVzay5jb20ifQ.5YoUPaX9jHRLmWuSFDPlCFQ4sTUypypplfOckfjzq5Y)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fintegrate-.net-maui-maps-with-android-native-embedding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyncfusionexamples%2Fintegrate-.net-maui-maps-with-android-native-embedding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fintegrate-.net-maui-maps-with-android-native-embedding/lists"}