0
In APK release key goes. In store APK does not show the map. Follow the manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.blablabla.blablabla.android" android:installLocation="auto" android:versionName="1.0.1.0" android:versionCode="1010">
<uses-sdk android:minSdkVersion="22" android:targetSdkVersion="27" />
<permission android:name="br.com.blablabla.blablabla.android.permission.MAPS_RECEIVE" android:protectionLevel="signature"></permission>
<uses-permission android:name="br.com.blablabla.blablabla.permission.MAPS_RECEIVE" />
<!-- We need to be able to download map tiles and access Google Play Services-->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Allow the application to access Google web-based services. -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!-- Google Maps for Android v2 will cache map tiles on external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- Google Maps for Android v2 needs this permission so that it may check the connection state as it must download data -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- They will allow Maps to use the My Location provider. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Camera also need Storage. -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.location" android:required="true" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<application android:allowBackup="true" android:label="@string/app_name" android:icon="@drawable/icon" android:theme="@style/android:Theme.Holo.Light">
<!-- Put your Google Maps V2 API Key here. -->
<meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyCfBlablablablabla... aqui está minha chave de API e as duas assinaturas de keystore estão lá nas credenciais restringindo Apps para Androi. Uma assinatura de debug do Xamarin e uma de release." />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"></meta-data>
</provider>
</application>
Here is the map XAML:
...
<maps:Map x:Name="blablabla"
HeightRequest="165"
HorizontalOptions="FillAndExpand"
IsShowingUser="True"
MapType="Street"
HasZoomEnabled="True"
HasScrollEnabled="True"/>
...
Also use in c# like this:
...
// Main Map:
blablabla = new Map(
MapSpan.FromCenterAndRadius(new
Position(AppPosition.Latitude,
AppPosition.Longitude),Distance.FromMiles(0.3)))
{
IsShowingUser = true,
MapType = MapType.Street,
HasZoomEnabled = true,
HasScrollEnabled = true,
HeightRequest = 170,
//VerticalOptions = LayoutOptions.FillAndExpand
//WidthRequest = 960,
HorizontalOptions = LayoutOptions.FillAndExpand
};
StackMarmitaMap.Children.Clear();
StackMarmitaMap.Children.Add(blablabla);
Where am I wrong? Thank you.
Related (external): https://stackoverflow.com/questions/44668322/google-map-not-showing-when-app-is-downloaded-from-playstore-but-showing-finewh
– CypherPotato
Yes! WTF! Thanks!!!
– Márcio Reck