Java Question AndroidManifest AddApplicationText?

NFOBoy

Active Member
Licensed User
Longtime User
Here is my B4A Manifest file
'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: Manifest Editor
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$")
AddApplicationText(
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="123456789012" />
)

my final AndroidManifest

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

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>
<application
android:icon="@drawable/icon"
android:label="B4A Example">

<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="123456789012" />
<activity
android:windowSoftInputMode="stateHidden"
android:launchMode="singleTop"
android:name=".main"
android:label="B4A Example"
android:screenOrientation="unspecified">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>
</application>
</manifest>

And here is the error I am receiving in the Console

06-12 11:06:51.510: E/GamesIntentService(8361): Using Google Play games services requires a metadata tag with the name "com.google.android.gms.games.APP_ID" in the application tag of your manifest

and here is the manifest from the Trivial Quest example app that I have up and running on my Developer account

<?xml version="1.0" encoding="utf-8"?>
<!-- TO TRY THIS SAMPLE: change the package name below ("package" attribute of
the <manifest> tag to your own package name. It must not start with
com.example, com.google or com.android.
-->


<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="b4a.pasagosoft.test.app.app"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />

<activity
android:name="b4a.pasagosoft.test.app.app.MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

Anybody see the error in the Manifest as called out by Eclipse?
 

NFOBoy

Active Member
Licensed User
Longtime User
Erel,

I've done that. And I also registered the fingerprint from the release key that I use... still the same error...

If I put in the wrong APP_ID in my eclipse build, the program still runs, it just gets an error when signing in. (No error about not including the code in the Manifest)

Hrmmm, will try to see if using a different target build (I use 17 in Eclipse) might do the trick..
 

NFOBoy

Active Member
Licensed User
Longtime User
Woooo SIGN IN SUCCESS!

Ok,

so needed to just add the ids.xml file to the res/values folder, apparently can't just do it straight from the Manifest itself... and my B4A app is logged in to my developer account...

Slowly making progress...


---- You beat me to it Erel! :) --------------
 
Last edited:
Top