Reputation: 347
Sir,
I have made an Activity
Page to display map. For this I have done each and every step as guided on article linked as : http://www.c-sharpcorner.com/article/xamarin-android-create-google-map-with-marker/
When I have Builded & Deployed application on my android device, Activity
page would be displayed fully white with Google
logo at bottom left corner of screen, But no map displayed & also no error would be occured.
Why activity page is displayed fully white & why would map is not displayed?
Upvotes: 0
Views: 1001
Reputation: 16652
Google Map Showing White Page With Google Logo xamarin.Android
Please make sure Google Play Services in your device is available. If the Google Play Services APK is not installed, your google map app will showing a blank page with Google Logo, exactly same with your situation.
Check for Google Play Services :
public bool IsPlayServicesAvailable ()
{
int resultCode = GoogleApiAvailability.Instance.IsGooglePlayServicesAvailable (this);
if (resultCode != ConnectionResult.Success)
{
if (GoogleApiAvailability.Instance.IsUserResolvableError (resultCode))
msgText.Text = GoogleApiAvailability.Instance.GetErrorString (resultCode);
else
{
msgText.Text = "Sorry, this device is not supported";
}
return false;
}
else
{
msgText.Text = "Google Play Services is available.";
return true;
}
}
Calling this method in OnCreate
method :
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.Main);
msgText = FindViewById<TextView> (Resource.Id.msgText);
IsPlayServicesAvailable ();
}
For more detail information, you could read this document.
Upvotes: 1
Reputation: 889
Use Google Maps API v2 Key and ensure it is added to your AndroidManifest.xml file correctly AND ALSO Make sure you add these permissions to the manifest
<permission
android:name="com.deg.blubcnmobl.droid.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.deg.blubcnmobl.droid.permission.MAPS_RECEIVE"/>
Upvotes: 0