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>
Related
I'm not an android dev. I used capacitor to convert a web app into an android app. The new sdk 31 changes have required me to add android:exported=true onto the mainActivity tag in androidManifest.xml file since it has intent filters. Basically, in order for my app to be approved by google console I need to add this one property.
ELI5 - is this safe, what does this do ?
<activity
android:name="com.test.MainActivity"
android:exported="true" <---------------------------- this
android:launchMode="singleTask"
>
Yes, it's safe to use exported true is used correctly
The exported attribute is used to define if an activity, service, or receiver in your app is accessible and can be launched from an external application.
As a practical example, if you try to share a file you’ll see a set of applications available. Clicking on one of them will open the activity responsible to handle that file, which means that it’s declared on the Manifest with exported:true.
For more details https://cafonsomota.medium.com/android-12-dont-forget-to-set-android-exported-on-your-activities-services-and-receivers-3bee33f37beb
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 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
I have uploaded my first application to google playstore
as you see in this image in manifest in package it says auc.visorimagenes.ssssss
in the left part you could see my structure code where it is as
auc.visorimagenes.
in playstore
you see it:
but What it says auc.visorimagenes
if in my manifest I had set auc.visorimagenes.sssss
I want to up a new app with same code (only changing some resources) this is would be a new app not an update.
then I must to change auc.visorimagenes.sssss ???
Contains information about a Java package. This includes implementation and specification versions. Typically this information is retrieved from the manifest.
Packages are managed by class loaders. All classes loaded by the same loader from the same package share a Package instance.
Hope this helps!
Could you try and change the android:name attribute of your application entry in the manifest as follows and see if it helps?
<application
....
android:name=".App" (or android:name=".Application.App")
/>
This will ensure that the app uses the same package name as the one declared in the manifest.
The package in android is the name of the application that makes it unique from any other android apps, therefore allow the production of multiple apps with the same product name.
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