4

I have created a cross platform App using Xamarin forms. On Mac Book Pro(el-Capitan) I need to use maps in it thus using Xamarin.Forms.Maps My manifest file is given below Manifest file

I have generated an API key on Google Developers Console using the SHA1 signature. On Mac I have used the following commands

keytool -genkey -alias ftpKey -keystore privateKey.store

keytool -list -v -keystore privateKey.store

This gives me the SHA1 key

For the package name I have used exactly the same name as given in the package com.xrmlabs.submyclass.

Code for Map Generation is given below

constructor of tabbed page

This is the output on both physical device(API level 22) as well as Xamarin Android Emulator(API Level 16). Everything in debug mode

Output on Emulator

I have used locator service too as is evident by the code, but I have removed it for now to keep things simple. When I run the app, there is no error.

Because this is my first app I may be doing it the wrong way. I have gone through the following answers Android Studio - Google map still blank on real Android device

Android: Blank page when using google map api 2

Community
  • 1
  • 1
Sudeep
  • 343
  • 5
  • 12
  • Have you tried zooming/panning? Are you sure you're not just viewing a blank area of the map? – Jason Mar 18 '16 at 12:56
  • I get this on devices running Android 6. I think its a permissions thing. bug in Xamarin Maps – JKennedy Mar 18 '16 at 14:07
  • If you look at your debugging output, I believe that there should be some sort of message indicating the API communication between the app and Google Maps. Are you getting any particular messages? I know you stated that the package name matched correctly, but do please double and triple check that it is. There are no currently known issues of this sort on Android 6 devices right now. – Paul Mar 18 '16 at 16:56

3 Answers3

1

I have solved this problem by configuring my project in Google Console to Enable Places SDK for Android And Maps SDK for Android

wait for few minutes and BOOM !

p90n33r
  • 1,671
  • 3
  • 9
  • 6
0

Try to add this code below your API KEY meta-data in AndroidManifest:

<meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
Graham
  • 7,431
  • 18
  • 59
  • 84
Taras Shevchuk
  • 326
  • 3
  • 14
0

There are few things which can create this kind of issues 1. Check whether your Date and time of your system and device is right 2. Check whether your Google maps API in [https://console.developers.google.com] is enabled 3.if you changed the java version or path for the project it creates new SHA1 fingerprints and clashes the older one so even check that in Tools > Options > Xamarin > Android options > Java keytool path. As well as path set in your environment variables of My computer Because of it Sometimes shows Authentication error because of SHA1 fingerprints. Also check your output window as you run your app it will exactly tell you where you gone wrong. you can try creating new api key if required and Dont forget to add it in Manifest file.

Rajeshree
  • 59
  • 1
  • 5