{"id":19369242,"url":"https://github.com/mapsme/api-android","last_synced_at":"2025-08-02T11:06:51.261Z","repository":{"id":9346341,"uuid":"11196555","full_name":"mapsme/api-android","owner":"mapsme","description":"Offline Maps API for Android","archived":false,"fork":false,"pushed_at":"2021-12-29T22:01:50.000Z","size":366,"stargazers_count":184,"open_issues_count":5,"forks_count":112,"subscribers_count":61,"default_branch":"master","last_synced_at":"2025-05-20T09:04:34.811Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/mapsme.png","metadata":{"files":{"readme":"README.html","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}},"created_at":"2013-07-05T09:48:25.000Z","updated_at":"2025-04-28T01:18:19.000Z","dependencies_parsed_at":"2022-09-14T01:13:52.183Z","dependency_job_id":null,"html_url":"https://github.com/mapsme/api-android","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mapsme/api-android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapsme%2Fapi-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapsme%2Fapi-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapsme%2Fapi-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapsme%2Fapi-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapsme","download_url":"https://codeload.github.com/mapsme/api-android/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapsme%2Fapi-android/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268378799,"owners_count":24240896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":[],"created_at":"2024-11-10T08:10:16.477Z","updated_at":"2025-08-02T11:06:51.207Z","avatar_url":"https://github.com/mapsme.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003emaps.me Android API: Getting Started\u003c/h1\u003e\n\n\u003ch2\u003eIntroduction\u003c/h2\u003e\n\n\u003cp\u003eNOTE: We have changed the name of our maps from MapsWithMe to MAPS.ME, but left all references below unchanged.\u003c/p\u003e\n\n\u003cp\u003eMapsWithMe Android API (hereinafter referred to as \u003cem\u003e\u0026quot;API Library\u0026quot;\u003c/em\u003e or just \u003cem\u003e\u0026quot;library\u0026quot;\u003c/em\u003e)\nprovides interface for client application to perform next tasks:\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eShow one or more points on offline map of \u003ca href=\"http://maps.me/\" title=\"MAPS.ME\"\u003eMapsWithMe Application\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003eCome back to the client application after selecting specific point on the map, by sending \u003ca href=\"http://developer.android.com/reference/android/app/PendingIntent.html\" title=\"PendingIntent\"\u003ePendingIntent\u003c/a\u003e with point data when user asks for more information by pressing \u0026quot;More Info\u0026quot; button in MapsWithMe Application\u003c/li\u003e\n\u003cli\u003eMap screen branding : your application\u0026#39;s icon and name (or custom title) will be placed at the top.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003eThus, you can provide \u003cstrong\u003etwo way communication between your application and MapsWithMe\u003c/strong\u003e,\nusing MapsWithMe to show points of interest (POI) and providing more information in your app.\u003c/p\u003e\n\n\u003cp\u003ePlease refer to \u003ca href=\"https://github.com/mapswithme/api-android/tree/master/sample-app-capitals\" title=\"Api Source Code\"\u003esample application\u003c/a\u003e for demo or see\nour \u003ca href=\"http://www.guidewithme.com\"\u003etravel guide apps\u003c/a\u003e as an API integration example.\u003c/p\u003e\n\n\u003ch2\u003ePrerequisites\u003c/h2\u003e\n\n\u003cp\u003eIt is supposed that you are familiar with Android Development, and you have Android SDK and Eclipse (or another IDE of your choice) installed.\nYou should be familiar with concept of \u003ca href=\"http://developer.android.com/guide/components/intents-filters.html\" title=\"Intents and Intent Filters\"\u003eIntents\u003c/a\u003e, \u003ca href=\"http://developer.android.com/tools/projects/index.html#LibraryProjects\" title=\"Android Library Project\"\u003elibrary projects\u003c/a\u003e, and \u003ca href=\"http://developer.android.com/reference/android/app/PendingIntent.html\" title=\"PendingIntent\"\u003ePendingIntents\u003c/a\u003e (recommended) as well.\nYour application must target at least \u003cem\u003eandroid sdk version 9\u003c/em\u003e.\u003c/p\u003e\n\n\u003ch2\u003eIntegration\u003c/h2\u003e\n\n\u003cp\u003eFirst step is to clone \u003ca href=\"https://github.com/mapswithme/api-android\" title=\"GitHub Repository\"\u003erepository\u003c/a\u003e or download it as an archive.\u003c/p\u003e\n\n\u003cp\u003eWhen your are done you find two folders: \u003cem\u003elib\u003c/em\u003e and \u003cem\u003esample-app-capitals\u003c/em\u003e. First one is a library project that you should add to your project.\nYou don\u0026#39;t need any additional permissions in your AndroidManifest.xml to use API library, so you can write real code straight away, calling for different \u003ccode\u003eMapsWithMeApi\u003c/code\u003e methods (more details below). \u003c/p\u003e\n\n\u003ch2\u003eClasses Overview and HOW TO\u003c/h2\u003e\n\n\u003cp\u003eCore classes you will work with are:\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"lib/src/com/mapswithme/maps/api/MapsWithMeApi.java\" title=\"MapsWithMeApi.java\"\u003ecom.mapswithme.maps.api.MapsWithMeApi\u003c/a\u003e - static class with methods such as \u003ccode\u003eshowPointOnMap(Activity, double, double, String)\u003c/code\u003e etc.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"lib/src/com/mapswithme/maps/api/MWMPoint.java\" title=\"MWMPoint.java\"\u003ecom.mapswithme.maps.api.MWMPoint\u003c/a\u003e - model of POI, includes lat, lon, name, id, and style data.\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"lib/src/com/mapswithme/maps/api/MWMResponse.java\" title=\"MWMResponse.java\"\u003ecom.mapswithme.maps.api.MWMResponse\u003c/a\u003e - helps you to extract response from MapsWithMe by applying \u003ccode\u003eMWMResponse.extractFromIntent(Intent)\u003c/code\u003e to Intent. Contains MWMPoint data.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch3\u003eShow Points on the Map\u003c/h3\u003e\n\n\u003cp\u003eThe simplest usage:\u003c/p\u003e\n\n\u003cpre\u003e\u003ccode\u003epublic class MyPerfectActivity extends Activity {\n...\n\n  void showSomethingOnTheMap(SomeDomainObject arg)\n  {\n    // Do some work, create lat, lon, and name for point\n    final double lat = ...;\n    final double lon = ...;\n    final String name = ...;\n    // Ask MapsWithMe to show the point\n    MapsWithMeApi.showPointOnMap(this, lat, lon, name);\n  }\n...\n\n}\n\u003c/code\u003e\u003c/pre\u003e\n\n\u003cp\u003eFor multiple points use \u003ca href=\"lib/src/com/mapswithme/maps/api/MWMPoint.java\" title=\"MWMPoint.java\"\u003eMWMPoint\u003c/a\u003e class:\u003c/p\u003e\n\n\u003cpre\u003e\u003ccode\u003evoid showMultiplePoints(List\u0026lt;SomeDomainObject\u0026gt; list)\n{\n  // Convert objects to MMWPoints\n  final MWMPoint[] points = new MWMPoint[list.length];\n  for (int i = 0; i \u0026lt; list.size; i++)\n  {\n    // Get lat, lon, and name from object and assign it to new MMWPoint\n    points[i] = new MWMPoint(lat, lon, name);\n  }\n  // Show all point on the map, you could also provide some title\n  MapsWithMeApi.showPointsOnMap(this, \u0026quot;Look at my points, my points are amazing!\u0026quot;, points);\n}\n\u003c/code\u003e\u003c/pre\u003e\n\n\u003ch3\u003eAsk MapsWithMe to Call my App\u003c/h3\u003e\n\n\u003cp\u003eWe support PendingIntent interaction (just like Android native\nNotificationManager does). You should specify ID for each point to\ndistinguish it later, and PentingIntent that MapsWithMe will send back to\nyour application when user press \u0026quot;More Info\u0026quot; button :\u003c/p\u003e\n\n\u003cpre\u003e\u003ccode\u003e// Here is how to pass points with ID ant PendingIntent\nvoid showMultiplePointsWithPendingIntent(List\u0026lt;SomeDomainObject\u0026gt; list, PendingIntent pendingIntent)\n{\n  // Convert objects to MWMPoints\n  final MWMPoint[] points = new MWMPoint[list.length];\n  for (int i = 0; i \u0026lt; list.size; i++)\n  {\n    //                                      ||\n    //                                      ||\n    //                                      \\/\n    //         Now you should specify string ID for each point\n    points[i] = new MWMPoint(lat, lon, name, id);\n  }\n  // Show all points on the map, you could also provide some title\n  MapsWithMeApi.showPointsOnMap(this, \u0026quot;This title says that user should choose some point\u0026quot;, pendingIntent, points);\n}\n\n//Code below shows general way to extract response data\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.activity_main);\n    // Handle intent you specified with PandingIntent\n    // Now it has additional information (MWMPoint).\n    handleIntent(getIntent());\n}\n\n@Override\nprotected void onNewIntent(Intent intent)\n{\n  super.onNewIntent(intent);\n  // if defined your activity as \u0026quot;SingleTop\u0026quot;- you should use onNewIntent callback\n  handleIntent(intent);\n}\n\nvoid handleIntent(Intent intent)\n{\n  // Apply MWMResponse extraction method to intent\n  final MWMResponse mwmResponse = MWMResponse.extractFromIntent(this, intent);\n  // Here is your point that user selected\n  final MWMPoint point = mwmResponse.getPoint();\n  // Now, for instance you can do some work depending on point id\n  processUserInteraction(point.getId());\n}\n\u003c/code\u003e\u003c/pre\u003e\n\n\u003ch2\u003eFAQ\u003c/h2\u003e\n\n\u003ch4\u003eHow should I detect if user has MapsWithMe installed?\u003c/h4\u003e\n\n\u003cp\u003e\u003ccode\u003eMapsWithMeApi.isMapsWithMeInstalled(Context)\u003c/code\u003e will return \u003ccode\u003etrue\u003c/code\u003e if user has \u003cem\u003eLite\u003c/em\u003e or \u003cem\u003ePro\u003c/em\u003e version that supports API call installed.\u003c/p\u003e\n\n\u003ch4\u003eWhich versions of MapsWithMe support API calls?\u003c/h4\u003e\n\n\u003cp\u003eAll versions since 2.4.0 and above support API calls.\u003c/p\u003e\n\n\u003ch4\u003eWhat will happen if I call for \u003ccode\u003eMapsWithMeApi.showPoint()\u003c/code\u003e but MapsWithMe application is not installed?\u003c/h4\u003e\n\n\u003cp\u003eNothing serious. API library will show simple dialog with gentle offer to download MapsWithMe. You can see how it looks like below. \u003cimg src=\"site/images/dlg.png\" alt=\"Please install us\"\u003e\u003c/p\u003e\n\n\u003ch2\u003eSample Code and Application\u003c/h2\u003e\n\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://play.google.com/store/apps/details?id=com.mapswithme.capitals\" title=\"Api Demo .apk\"\u003eSample Application at Google Play\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/mapswithme/api-android/tree/master/sample-app-capitals\" title=\"Api Source Code\"\u003eSample Application Source Code\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch2\u003eSupport\u003c/h2\u003e\n\n\u003cp\u003eIf you have any questions please email to \u003ca href=\"mailto:api@maps.me\" title=\"MAPS.ME Support Contact\"\u003eapi@mapswith.me\u003c/a\u003e.\u003c/p\u003e\n\n\u003chr\u003e\n\n\u003ch2\u003eAPI Code License\u003c/h2\u003e\n\n\u003cp\u003eCopyright (c) 2014, MapsWithMe GmbH\nAll rights reserved.\u003c/p\u003e\n\n\u003cp\u003eRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\u003c/li\u003e\n\u003cli\u003eRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003eTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \u0026quot;AS IS\u0026quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapsme%2Fapi-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapsme%2Fapi-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapsme%2Fapi-android/lists"}