To add the SHA-1 fingerprint, click + Add package name and fingerprint:Įnter your app's package name and enter the SHA-1 certificate fingerprint (obtained via keytool as explained earlier in this guide). Next, click the Android apps radio button: Click RESTRICT KEY:Ĭhange 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 it is necessary to restrict this key so that only your app can call APIs with this key. 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:Īfter this button is clicked, the API key is generated. Xamarin.Android applications must have an API key before they are granted access to Android Map API v2. Obtaining the API KeyĪfter the Google Developer Console API project has been created, it is necessary to create an Android API key. The next section explains how to create an API key and authorize a Xamarin.Android application to use this key. However, you cannot use this API in your project until you create credentials for it. On the next page, click ENABLEĪt this point the API project has been created and Google Maps Android API v2 has been added to it. From there, click ENABLE APIS AND SERVICES:įrom the API Library page, click Maps SDK for Android. Next, click the Create button as shown in this example:Īfter a minute or so, the project is created and you are taken to the Dashboard page of the project. This dialog will manufacture a unique project ID that is based on your project name. If you created a new project, enter the project name in the New Project dialog that is displayed. Click on a project name or create a new one by clicking NEW PROJECT: In a browser, navigate to the Google Developers Console API & Services Dashboard and click Select a project. Creating an API projectĪfter 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). You will use the SHA-1 fingerprint (listed after SHA1) later in this guide. Issuer: CN=Android Debug, O=Android, C=US You should see something like the following output in your console Remember to update the AndroidManifest.xml file with theĬorrect Google Maps API key before deployment. Resulting SHA-1 fingerprint used to create a production Google Maps API The keytool will need to be run with the private key details, and the When deploying an app to Google Play, it must be Keytool -list -v -keystore /Users//.local/share/Xamarin/Mono\ for\ Android/debug.keystore -alias androiddebugkey -storepass android -keypass android Keytool.exe -list -v -keystore "C:\Users\\AppData\Local\Xamarin\Mono for Android\debug.keystore" -alias androiddebugkey -storepass android -keypass android Run keytool using the following command (using the file paths shownĪbove): keytool -list -v -keystore -alias -storepass -keypass įor the default debug key (which is automatically created for you for System/Library/Java/JavaVirtualMachines/.jdk/Contents/Home/bin/keytool Users//.local/share/Xamarin/Mono for Android/debug.keystore This tool is typically found in the Java binĬ:\Program Files\Android\jdk\microsoft_dist_openjdk_\bin\keytool.exe Information about a keystore is obtained by running the keytoolĬommand from the JDK. Xamarin.Android application can be found at the following location:Ĭ:\Users\\AppData\Local\Xamarin\Mono for Android\debug.keystore By default the keystore that is used to sign debug versions of a
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |