May 10, 2018 Hi Guys! Follow this steps and the maps is going to show up after publish on playstore: 1 - make sure you've added your key into release/googlemapsapi.xml 2- create a keystore 3 get the SHA1. Android allow us to integrate google maps in our application so we need to generate an API Key using google developer account. This article shows you how to generate Google map API key from google developer account. Is there a way to find out if i've generated a right API key? From the same debug.keystore i've managed to get Facebook HASH Key with no problems but from some reason after generating the MD5.
-->To use the Google Maps functionality in Android, you need toregister for a Maps API key with Google. Until you do this, you willjust see a blank grid instead of a map in your applications. You mustobtain a Google Maps Android API v2 key - keys from the older GoogleMaps Android API key v1 will not work.
Obtaining a Maps API v2 key involves the following steps:
To request a Maps API key from Google, you need to know theSHA-1 fingerprint of the keystore that is used to sign the application.Typically, this means you will have to determine the SHA-1 fingerprintfor the debug keystore, and then the SHA-1 fingerprint for the keystorethat is used to sign your application for release.
By default the keystore that is used to sign debug versions of aXamarin.Android application can be found at the following location:
C:Users[USERNAME]AppDataLocalXamarinMono for Androiddebug.keystore
Information about a keystore is obtained by running the keytool
command from the JDK. This tool is typically found in the Java bindirectory:
C:Program FilesAndroidjdkmicrosoft_dist_openjdk_[VERSION]binkeytool.exe
By default the keystore that is used to sign debug versions of aXamarin.Android application can be found at the following location:
/Users/[USERNAME]/.local/share/Xamarin/Mono for Android/debug.keystore
Information about a keystore is obtained by running the keytool
command from the JDK. This tool is typically found in the Java bindirectory:
/System/Library/Java/JavaVirtualMachines/[VERSION].jdk/Contents/Home/bin/keytool
Run keytool using the following command (using the file paths shownabove):
For the default debug key (which is automatically created for you fordebugging), use this command:
When deploying an app to Google Play, it must besigned with a private key.The keytool
will need to be run with the private key details, and theresulting SHA-1 fingerprint used to create a production Google Maps APIkey. Remember to update the AndroidManifest.xml file with thecorrect Google Maps API key before deployment.
You should see something like the following output in your consolewindow:
You will use the SHA-1 fingerprint (listed after SHA1) later in this guide.
After you have retrieved the SHA-1 fingerprint of the signing keystore, it is necessary to create a new project in the Google APIs console (or add the Google Maps Android API v2 service to an existing project).
In a browser, navigate to the Google Developers Console API & Services Dashboard and click Select a project. Click on a project name or create a new one by clicking NEW PROJECT:
If you created a new project, enter the project name in the New Project dialog that is displayed. This dialog will manufacture a unique project ID that is based on your project name. Next, click the Create button as shown in this example:
After a minute or so, the project is created and you are taken to the Dashboard page of the project. From there, click ENABLE APIS AND SERVICES:
From the API Library page, click Maps SDK for Android. On the next page, click ENABLEto turn on the service for this project:
At this point the API project has been created and Google Maps Android API v2 has been added to it. However, you cannot use this API in your project until you create credentials for it. The next section explains how to create an API key and white-list a Xamarin.Android application so that it is authorized to use this key.
After the Google Developer Console API project has been created, it is necessary to create an Android API key. Xamarin.Android applications must have an API key before they are granted access to Android Map API v2.
In the Maps SDK for Android page that is displayed (after clicking ENABLE in the previous step), go to the Credentials tab and click the Create credentials button:
Click API key:
After this button is clicked, the API key is generated. Next it is necessary to restrict this key so that only your app can call APIs with this key. Winzip registry optimizer license key generator. Click RESTRICT KEY:
Change the Name field from API Key 1 to a name that will help you remember what the key is used for (XamarinMapsDemoKey is used in this example). Next, click the Android apps radio button:
To add the SHA-1 fingerprint, click + Add package name and fingerprint:
Enter your app's package name and enter the SHA-1 certificate fingerprint (obtained via keytool
as explained earlier in this guide). In the following example, the package name for XamarinMapsDemo
is entered, followed by the SHA-1 certificate fingerprint obtained from debug.keystore:
Note that, in order for your APK to access Google Maps, you must include SHA-1 fingerprints and package names for every keystore (debug and release) that you use to sign your APK. For example, if you use one computer for debug and another computer for generating the release APK, you should include the SHA-1 certificate fingerprint from the debug keystore of the first computer and the SHA-1 certificate fingerprint from the release keystore of the second computer. Click + Add package name and fingerprint to add another fingerprint and package name as shown in this example:
Click the Save button to save your changes. Next, you are returned to the list of your API keys. If you have other API keys that you have created earlier, they will also be listed here. In this example, only one API key (created in the previous steps) is listed:
Beginning June,11 2018, the API key will not work if the project is not connected to a billable account (even if the service is still free for mobile apps).
Click the hamburger menu button and select the Billing page:
Link the project to a billing account by clicking Link a billing account followed by CREATE BILLING ACCOUNT on the displayed popup (if you don't have an account, you will be guided to create a new one):
Finally, add this API key to the AndroidManifest.XML file of your Xamarin.Android app. In the following example, YOUR_API_KEY
is to be replaced with the API key generated in the previous steps:
A Google Firebase Server Key is required for all Android mobile apps and Chrome apps & extensions. It is optional for Amazon apps.
A Firebase Server Key and Firebase Sender ID are required in order to send push notifications to Android mobile app devices.
The goal of this section is to provision your Firebase Server Key and Firebase Sender ID for use in OneSignal.
If you already have an FCM project you would like to use with OneSignal, you will need to retrieve your Sender ID and Firebase Cloud Messaging token. You may then skip to Step 2.
Visit the Firebase Console and sign in with your Google account.
Click CREATE NEW PROJECT or select an existing one below.
Enter a project name and press CREATE PROJECT.
Click the gear icon in the top left and select Project settings.
Select the CLOUD MESSAGING tab.
Save the two values listed under Server key and Sender ID.
In the OneSignal dashboard, select your app from the All Apps page, then go to Settings. Under Native App Platforms, click Google Android.
Paste your Firebase Server Key and Firebase Sender ID into the fields and click Save.
Done! You now have a key to send push notifications from your app. 🥳
Next, install the OneSignal SDK in your app. If you need help, we have a few SDK-specific guides:
Android SDK Setup |
Amazon SDK Setup |
Chrome Extension SDK Setup |
Mobile Push Quickstart |