My code:
My package name:
My manifest:
My key online:
And yes the numbers and letters replaced by XXXX do match. Whenever I sign my app and load it up on my Nexus 5 from B4A bridge it instantly crashes. What am I doing wrong?
B4X:
#Region Project Attributes
#ApplicationLabel: MAPS TEST
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
'Activity module
Sub Process_Globals
End Sub
Sub Globals
Dim mFragment As MapFragment
Dim gmap As GoogleMap
Dim MapPanel As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
MapPanel.Initialize("")
Activity.AddView(MapPanel, 0, 0, 100%x, 100%y)
If mFragment.IsGooglePlayServicesAvailable = False Then
ToastMessageShow("Google Play services not available.", True)
Else
mFragment.Initialize("Map", MapPanel)
End If
End Sub
Sub Map_Ready
Log("map ready")
gmap = mFragment.GetMap
If gmap.IsInitialized = False Then
ToastMessageShow("Error initializing map.", True)
Else
gmap.AddMarker(36, 15, "Hello!!!")
Dim cp As CameraPosition
cp.Initialize(36, 15, gmap.CameraPosition.Zoom)
gmap.AnimateCamera(cp)
End If
End Sub
My package name:
B4X:
com.testmaps.wekell
My manifest:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
AddManifestText( <permission
android:name="$PACKAGE$.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>)
AddManifestText( <permission
android:name="$PACKAGE$.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>)
AddApplicationText(<meta-data
android:name="com.testmaps.wekell"
android:value="XXXXSyB18JvF0DUO3PmiurALqC5kTBemWH07MAQ"/>)
'End of default text.
My key online:
B4X:
Key for Android apps (with certificates)
API key:
XXXXSyB18JvF0DUO3PmiurALqC5kTBemWH07MAQ
Android apps:
XX:XX:XX:XX:DD:0F:2E:E0:94:B6:D3:61:5B:1B:2B:D8:F0:B3:88:8D;com.testmaps.wekell
And yes the numbers and letters replaced by XXXX do match. Whenever I sign my app and load it up on my Nexus 5 from B4A bridge it instantly crashes. What am I doing wrong?