I'm having a bit of trouble trying to implement GoogleMaps, as here: https://www.b4x.com/android/forum/threads/google-maps.63930/#content
I've followed those instructions (by creating a new, blank project), but keep getting the ToastMessage: "Please install Google Play Services."
I know it's a bit vague, but I didn't want to upload the .zip file of the project since it has my API key in it, but any ideas? My manifest looks like this:
I should add that my Project Attributes looks like this:
When I added the last line, the ToastMessage went away, but no map shows up. Also, I have to mention that that directory doesn't actually exist on my machine when going to it in Windows Explorer (I have up to the google_play_services folder, but not libprojects folder).
I've followed those instructions (by creating a new, blank project), but keep getting the ToastMessage: "Please install Google Play Services."
I know it's a bit vague, but I didn't want to upload the .zip file of the project since it has my API key in it, but any ideas? My manifest looks like this:
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: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
'************ Google Play Services Base ************
AddApplicationText(
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="false"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
)
'************ Google Play Services Base (end) ************
AddApplicationText(
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCGKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "/> (my API key is in here)
)
I should add that my Project Attributes looks like this:
B4X:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#AdditionalJar: com.google.android.gms:play-services-maps
#AdditionalRes: C:\Users\FirstName LastName\AppData\Local\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
#End Region
When I added the last line, the ToastMessage went away, but no map shows up. Also, I have to mention that that directory doesn't actually exist on my machine when going to it in Windows Explorer (I have up to the google_play_services folder, but not libprojects folder).
Last edited: