I am facing a weird behavior while generating signed apk. In my app I am integrating facebook integration and using facebook app id in string and giving reference from string resource file. Since my app is multi lingual it is giving me below error.
as mentioned in below link I am giving app id in string file
Error on application ID of facebook app in Manifest
as I am developing multi lingual app and created 2 string files and created a string with name 'facebook_app_id' in both files. I don't know the reason while I am giving the same name in both files
I have solved the problem by just adding the below lines in meta tag line.
tools:ignore="ManifestResource"
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"
tools:ignore="ManifestResource" />
as mentioned here
https://code.google.com/p/android/issues/detail?id=194705
Related
I'm very new to Android and I want to launch my first application but I'm facing problem while I'm trying to apply AdMob code in my application.
When I check my code with test ad id it is working fine but when I'm using the same code with my real AdMob App id and Unit id this give me no add in my frame and the Logcat is showing me this.
19 5029-5216/com.example.aviralchauhan.demoplayer E/FA: GoogleService failed
to initialize, status: 10, Missing google app id value from from string
resources with name google_app_id.
2019-07-23 12:14:10.330 5029-5216/com.example.aviralchauhan.demoplayer E/FA:
Missing google_app_id. Firebase Analytics disabled 2019-07-23 12:14:10.336 5029-5216/com.example.aviralchauhan.demoplayer E/FA:
Uploading is not possible. App measurement disabled
As you suggested that this is duplicate question so can you please explain that it's really important to connect the application with firebase to show to ads in my application as I already told you test ads are working fine.
No, it is not really necessary to integrate Firebase with Google but it is recommended so as to get detailed statics over how the user acts over your app and their interaction with the app.
Now, the main topic: Why the add code is not working?
I am sure that you have something like this in your manifest.xml file:
<manifest>
<application>
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="YOUR_ADMOB_APP_ID"/>
</application>
</manifest>
There, the text YOUR_ADMOB_APP_ID must be replaced by a real ID which you will get by adding your app to the AdMob dashboard. Check this to get the real ID.
<manifest>
<application>
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true"/>
</application>
set on app AndroidManifest.xml file
Using Unity and CloudOnce,
I am implemeting cloudonce in my app withouth successfull, so I started a new project , just added the cloudonce and set up it correctly,
but it crashed, After look up in the logs on logcats the error was
"Using Google Play games services requires a metadata tag with the
name "com.google.android.gms.games.APP_ID" in the application tag of
the manifest for com.xxx.xxx"
after further look in the manifest, I miss this
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="#string/app_id" />
After look in the Plugins/Android/AndroidManifest there is no meta data with the app id either
You can either run the Android setup from the Unity Menu or invoke it statically with the correct values. If you just want to add the app id property to the AndroidManifest.xml, you can escape it with a space to force the parser to interpret the app id as a string. This is what the plugin does when you run setup.
For example:
<!-- The space in these forces it to be interpreted as a string vs. int -->
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="\ 1213456789" />
I programmed hardcoded manifest file, like below:
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="111111111111" />
In this case, facebook sdk couldn't detect meta-data definition.
But, the way to reference string value works well.
I aware the reason of using string resource file is for performance issue. however, there seems to be another reason.
What's that?
I agree with Mr. Murphy, I tried the same but at the end i had to put the Facebook App Id inside my Strings.xml, probably security reasons, your FB App Id must be "loaded from your project".
the example described in the documentation does the same:
To update your app, first add a reference to your App ID into the
AndroidManifest.xml file. Since you are no longer using your App ID to
instantiate a Facebook object, you will need to include the following
line to allow the SDK to identify your application on Facebook:
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
Next, add a string resource to your strings.xml file with your App ID.
<string name="app_id">12345678910</string>
I submitted an app to the app store last year and I found out a few weeks ago the name is being used for something similar. Is there a way to change the name of the app?
UPDATE:
In AIR you an application has an application descriptor file. In the application descriptor file is the Android manifest.
In the application descriptor file change the name attribute (leave the id the same):
<application xmlns="http://ns.adobe.com/air/application/3.6">
<id>com.mycompany.myAppID</id>
<filename>MyApplicationFile</filename>
<name>My Application Name</name>
At first I thought that you needed to change the "android:label" attribute on the application tag in the Android specific section as shown:
<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<uses-sdk android:targetSdkVersion="12"/>
<uses-sdk android:minSdkVersion="8"/>
<application android:label="My Application Name"></application>
</manifest>
]]></manifestAdditions>
</android>
But when I did that I would get an error, "error 404: Android attribute android:label is not allowed to be overridden". I'm guessing the AIR compiler is setting that attribute through the name property.
In Android on the device the name has been changed. However, I have yet to upload this to GooglePlay. I think I need to change the application product name there as well.
UPDATE
Answer: Change the name property.
<application xmlns="http://ns.adobe.com/air/application/3.6">
<id>com.mycompany.myAppID</id>
<filename>MyApplicationFile</filename>
<name>Application Name Can Change</name>
You cannot change the ID as mentioned in an answer but you can change the name. I changed the name, created a new build, uploaded it to the Google app store and it has changed on the Google app store successfully.
Yes, you can change the name whenever you want by changing android:label attribute of your application tag in AndroidManifest.xml file.
But, you can't change Package name once you uploaded app on play store.
It turns out that all I had to do to change the name of the app is to change the name property in the application descriptor file.
Before:
<application xmlns="http://ns.adobe.com/air/application/3.6">
<id>com.mycompany.myAppID</id>
<filename>MyApplicationFile</filename>
<name>My Application Name</name>
</application>
After:
<application xmlns="http://ns.adobe.com/air/application/3.6">
<id>com.mycompany.myAppID</id>
<filename>MyApplicationFile</filename>
<name>My Shiny New Application Name</name>
</application>
I changed the name, created a new build and package, uploaded it to Google app store and published. I changed the name of the Google app store listing a few minutes after upload. When the app changes went live the app name was changed. The app may have been in draft mode but I think I published it on accident before changing the name in the store. Either way it's updated.
The app ID shows up in some locations and lists and there is nothing you can do AFAIK to change it after it has been submitted to some app stores except submit a new app with that ID.
Take a look at this link if you want to change your app name. Also you have to update your app on Google Play.
yes you can change, this is the answer i got from google support
me : can i change app name, app icon and description, after app is published
i mean the name appear on google play and icon
11:09 pm
Google play chat answer :
Yes, you can change your app details on the Main Store Listing page of your Play Console.
I can't comment yet so this is my answer.
You can't change the name of the package once you've uploaded the first APK.
You also can't remove an app from the store as far as I can see. You can only deactivate an APK and un-publish the store listing. As far as I can tell, you can't remove it to allow you to upload a package of the same name again o_0 - bit of a problem for me considering I misspelled my package name first time round :/
You don't need to re-upload your package. All apps -> select app -> store presence -> store listing and change the title
I added the code as it is written
here
But I can't see banners with ads in my game.
My app is published. But the current version is not published yet.
I've added to manifest:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
There is a similar thread
here
But I could not understand the answer there.
They wrote:
You don't need to have an app already on the market to get a Publisher ID for a new app.
In the Android Package URL field that's on the "Add Site/App" form, just enter
"market://details?id=your.package.name". You'll of course want to replace the
'your.package.name' with your app's actual package name.
The viewWidth warnings are fine and you will likely still see them after inserting
your Publisher ID.
I don't understand where should I include "market://details?id=your.package.name".
Logcat shows me the following errors:
w/Ads (3200) Invalid unknown request error: Cannot determine request type.
Is your ad unit id correct?
w/webcore(3200): can't get the viewwidth after the first layout
My publisher key is correctly inserted to the code.
BTW it was printed in logcat. (Is it possible to exclude printing it?)
Thanks
You don't need to have an app already on the market to get a Publisher
ID for a new app. In the Android Package URL field that's on the "Add
Site/App" form, just enter "market://details?id=your.package.name".
You'll of course want to replace the 'your.package.name' with your
app's actual package name. The viewWidth warnings are fine and you
will likely still see them after inserting your Publisher ID.
This is related to Admob, when adding an application to Admob (via admob.com) its not required to have the app published in the market. Admob will ask you for the package name, its ok to write a package name that is not yet published in the Android Market.