Android - Facebook connectivity fails - android

In my Android app, I am integrating the Facebook SDK to have the shareDialog in it. The share dialog open perfectly with the pre-populated details. When I clicked SHARE on top right of sharedialog screen, I am getting the below mentioned error in logcat and in Toast. Please let me know where my config needs correction.
Logcat
04-17 15:15:47.140: E/Facebook(14515): Error: com.facebook.FacebookException: Failed to
authenticate the application because of app name mismatch. Please check the application
name configured by the dialog.

Go to Facebook developers page
Apps --> "YourApp" --> settings -->
Then change Package name (your application package name) and Class name (your activity class name)
for an example:

This error is occuring due to mismatch of name, may be package name or class name or even application ID.
You need to check the AndroidMainfest.xml and also the dashboard of https://developers.facebook.com/apps/yourAppID/settings/. On the xml check if this is same as on the dashboard
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="app_id" /> //the app_id must be same as on the dashboard
<activity android:name="com.facebook.LoginActivity" >
</activity>
Also check for the package name, class name of the dashboard is same on your android app.

Related

Get appId with AGConnectServicesConfig failed

I have some doubts about this message in the logcat :
E/HMSSDK_AGCUtils: Get appId with AGConnectServicesConfig failed
If this error or message could give problems in the future since it is displayed when viewing the Maps Kit Map?
I have already tried the following:
No apply plugin of agconnect in build.grade
Manually add
<meta-data
android:name="com.huawei.hms.client.appid"
<!-- Replace xxx with the actual app ID, which can be obtained on the App information page. --> -->
android:value="appid=xxx">
</meta-data>
<!-- Replace xxx with the actual payment ID, which can be obtained from the app's IAP information. --> -->
<meta-data
android:name="com.huawei.hms.client.cpid"
android:value="cpid=xxx">
</meta-data>
But the message keeps popping up, is there anything else to consider? Would this message affect in some future?
Thank for for providing the information regarding this issue.
This E/HMSSDK_AGCUtils: Get appId with AGConnectServicesConfig failed message is printed when the HMS framework cannot get the AppID from AppGallery, if your App hasn't been uploaded onto the AppGallery, it is normal to show this message.
The framework will then get the AppID from agconnect-services.json file or manifest.xml, and the information is used by framework itself, will not influence the usage of Map Kit.

Getting an Error on application ID of facebook app in Manifest

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

Facebook registration process for Android App

I am in the process of registering my android app in facebook. I am following the steps shown in the document
https://developers.facebook.com/docs/android/getting-started
This needs the package name and the class name. I am aware of the package name. Could you please let me know what is "class name". Is this the launcher Activity (MainActivity.class) ?

can't see admob banners in libgdx app

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.

If i change the package name of my app... when i upload to googleplay the users will can update their apps?

Hi I have an app on googleplay and I updated the code of the app.
I moved the main activity of my app to another package, from com.myapp to com.myapp.activities. So I must change the package name on the manifest to com.myapp.activities.
Now, I want to upload this update of my app to googleplay. Will the package name change give users problems when they update their apps to this newer version?
The package attribute of the manifest tag in AndroidManifest.xml cannot change once you've uploaded the app to Google Play. This is the unique ID of the application and cannot be changed one it's published.
However, you can move the main activity itself; just move it to the new package (as you did), then change:
<activity android:name=".MyActivity" ... />
... to:
<activity android:name="com.myapp.activities.MyActivity" ... />

Categories

Resources