Createan Android app that displays a map by using the Google Maps Viewstemplate for Android Studio. If you have an existing Android Studio project thatyou'd like to set up, see Set up an Android Studio project.
Set Minimum SDK to an SDK version compatible with your test device.You must select a version greater than the minimum version required by theMaps SDK for Android version 19.0.x,which is Android API Level 21 ("Lollipop"; Android 5.0) or higher.See the Release Notes forthe latest information on the SDK version requirements.
Google Cloud offers a $0.00 charge trial. The trial expires at either end of 90 days or after the account has accrued $300 worth of charges, whichever comes first. Cancel anytime. Google Maps Platform features a recurring $200 monthly credit. For more information, see Billing account credits and Billing.
This step only goes through the API Key creation process. If you use your API Key in production, we strongly recommend that you restrict your API key. You can find more information in the product-specific Using API Keys page.
This section describes how to store your API key so that it can be securely referenced byyour app. You should not check your API key into your version control system, so we recommendstoring it in the secrets.properties file, which is located in the root directory of yourproject. For more information about the secrets.properties file, seeGradle properties files.
The purpose of this file is to provide a backup location for the API key if the secrets.properties file is not found so that builds don't fail. This can happen if you clone the app from a version control system which omits secrets.properties and you have not yet created a secrets.properties file locally to provide your API key.
The maps activity file is the main activity for the app, andcontains the code to manage and display the map. By default, the file thatdefines the activity is named MapsActivity.java or if you set Kotlin as thelanguage for your app, MapsActivity.kt.
The GoogleMap object provides access to the map data andview. This is the main class of the Maps SDK for Android. The Map Objectsguide describes the SupportMapFragment and GoogleMap objects in moredetail.
The moveCamera function centers the map at theLatLng coordinates for Sydney Australia. The first settings toconfigure when adding a map are usually the map location and camera settings;such as viewing angle, map orientation, and zoom level. See theCamera and View guide for details.
The activity_maps.xml file is the XML layout file that defines thestructure of the app's UI. The file is located in the res/layout directory.The activity_maps.xml file declares a fragment that includes the followingelements:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
With the Maps SDK for Android, add maps to yourAndroid app includingWear OS apps using GoogleMaps data, map displays, and map gesture responses. You can also provideadditional information for map locations and support user interaction by addingmarkers, polygons, and overlays to your map.
I have a web map that has been configured for ArcGIS Field Maps using the field maps designer application on AGOL. It uses domain data capture and arcade expressions to auto name sample points that my field staff collect in a given sampling event. the arcade expression is set to look at various attribute fields and update the final sample nomenclature based on what was submitted.
The new web map/field maps has been working fantastically for my iOS users. Recently, we have had a staff member with an android phone start working within the web map. Every time they collect a GPS Point feature, Field Maps completely crashes without any error message. We also have polyline and polygon feature layers within this web map that the staff member is able to collect without any problem. The polyline and polygon features do not have any arcade logic associated with them and so that is why I am thinking it could be an issue related to that. Wondering if this is a bug related specifically with Field Maps Arcade expressions and Android devices. Hoping to either get some advice on fixes or raise awareness of a possible bug.
I am not positive that explicitly points to the issue. I took a look on iOS, which doesn't crash as you mentioned, and noticed the @ symbol in one of the fields and as part of the popup title. I assume this is added from your arcade expression? Can you try removing this symbol from the expression and see if the app still crashes?
Hi @travisajohnson_wsp , what Android devices and OS versions are you seeing this on? Would you be able to share your Web Map with us? You can add the Map and Feature Service(s) to a Group and invite the user "Arcgisfieldmaps". Thanks!
Apologies for the delay on this. I have invited the "Arcgisfieldmaps" user account to our Esri Troubleshooting group and shared the trouble-some web map and feature layer with the group. Any help troubleshooting the issue would be appreciated. Again this only seems to be an issue on android devices. The user who reported the issue is on a Samsung Galaxy smartphone, unsure of the version but would assume the most recent.
Thanks for looking into this! Apologies for the late response. I never received a notification of your response . Will test this out and let you know if the issue continues. Ideally, we want to keep the @ symbol as it is needed for the point nomenclature, but if it is the source of the crash, we can live without it.
I think we fixed the issue after running some tests! It appears it was tied to the "Form Title" within field maps. I had it populating based on data that was entered within the form (i.e. Form Title: SampleNomenclature). It may have been related to the @ symbol that is within the SampleNomenclature attribute field, or just it trying to actively populate the field as data was being entered since SampleNomencature is a calculated field itself. What I did was just change the Form Title to something static (i.e. "GPS Point") and that seems to have fixed the issue! Appreciate your help with this!
I don't know to how to get Google Maps Android API v2 enable because all the links I have tried are old and Google had changed it's site design.Please help me. I already have wasted a lot of time on this.
My actual developing took place on a Windows machine. Then I bought a Mac and figured I'd develop on it. I installed Android Studio on my Mac, checked out my project from Github, then attempted a run of it using my Android phone. The APK installation carried out seamlessly. However, once the application launched on the phone, the GoogleMap wouldn't display, even though the rest of my app was functioning normally. Then I found this link => -community/react-native-maps/issues/69, went to my
console.developers.google.com/ and opened my Google Maps key that I had issue with.
What I saw was that the key was restricted to Android apps. But I was working on an Android app, how could this be the issue? Anyhow, I switched Key Restriction to None, reran my app, and GoogleMap loaded just as it should had.
This may happen when the package name is incorrect in the console credential sectionfor development and production make sure your package name is correct.In my case, the package name was wrong when I corrected it map become visible
I opened app/build.gradle, found applicationId value with applicationIdSuffix, if exists, and joined, for instance into com.example.myapp.debug. In the link I changed an applicationName to this new value and opened the link.
Again created a new project, generated a new key and edited it, wrote package name and SHA-1 fingerprint, like @Linh Dao wrote. Then saved. If you later with to find that key, find your project in Google console and open credentials.
1.Go to the Google Maps Platform > Credentials page.2.Create a new API key3. Under Key restrictions, set the following restrictions:Application restrictions:Select Android apps.Click + Add package name and fingerprint.Enter your package name and SHA-1 certificate fingerprint.For example:
India and Malaysia Maps now splitHome_en, News/UpdatesThe maps of India and Malaysia-Indonesia have become much too large over time (significantly >2GB) and will therefore be split into smaller parts:
The LaserScan elevation data has been further improved and extended by @Sonny. We recommend downloading the complete Europe maps again to avoid ghost lines in overlapping areas with the old elevation data.
The data structure for the Mapsforge POIs, as used by ORUX-Maps, has been made more efficient and this new programme library has been implemented in the new versions of ORUX.
For users of older versions of ORUX who for some reason cannot be updated (old smartphone, etc.) we will continue to keep the old version of the ORUX pois available for download here
_old/
Please do not link permanently yet, the names of the zip files will still change.
We may request cookies to be set on your device. We use cookies to let us know when you visit our websites, how you interact with us, to enrich your user experience, and to customize your relationship with our website.
3a8082e126