Android Question Google Play Services

Terradrones

Active Member
Licensed User
Hi
I need advise again please.
I am trying to use the Google Map in my Survey application, but keep on getting this error message when I want to access the Map in my application:

com.google.android.gms.common.GooglePlayServicesMissingManifestValueException: A required meta-data tag in your app's AndroidManifest.xml does not exist. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@Integer/google_play_services_version" />

But it is in my AndroidManifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="b4a.identity"
android:versionCode="1"
android:versionName=""
android:installLocation="internalOnly">

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="b4a.identity.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<application
android:icon="@drawable/icon"
android:label="QESS">

<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" />

<uses-library
android:name="org.apache.http.legacy"
android:required="false" />

<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="xxxxxxx"/>
<activity
android:windowSoftInputMode="stateHidden"
android:launchMode="singleTop"
android:name=".main"
android:label="QESS"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>
<service android:name=".starter">
</service>
<receiver android:name=".starter$starter_BR">
</receiver>
</application>
</manifest>

Any advise please?
 

Terradrones

Active Member
Licensed User
Hi Erel

Thank you for coming back to me.

Is it possible to give me an email address please? I would like to send you a link to the program via "WeTransfer", as the code is too big for the Forum.
 
Upvote 0

Terradrones

Active Member
Licensed User
Hi Erel, is it IDE....Project....Manifest Editor that you are looking for?

If so, here it is:
'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="29"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.

Sorry, about all these stupid questions, but I am still trying to change my way of thinking from programming for the Compact Framework to that of B4A.
 
Upvote 0

Terradrones

Active Member
Licensed User
Thank you very much Erel, my Google Maps is working now.

It comes from being too much in a hurry and not reading things properly! Or I am getting too old for programming!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…