I'm using a Google Client Library to verify a token that is returned using Single Tap Sign In (google-api-client-1.32.2). I need to setup a proxy on my device in order to test my Android app locally. This works for a Pixel 2 device running Android 11. But it doesn't work if on a Nexus 6P running Android 8.
It is clear that the proxy is preventing the authentication from succeeding because if I disable the proxy, it works. I tried adding the domain googleapis.com to the list of domains that the proxy will ignore but that didn't help. It is possible that some other domain is also being used for authentication other than googleapis.com.
I use Charles as my proxy, but it doesn't show any domain other than googleapis.com.
Is there anything else I can try?
There was nothing wrong with the code, the proxy or anything else. This problem is the result of the same crap that has been happening for years with Android. If the app is already installed on a different device and you clear the app's cache before running the app, you are mistaken to believe that the app's setting are all cleared. Android stores the settings in the cloud in your Google Drive under the device's backup. So when you clear the cache or even reinstall the app, Android retrieves the app's settings from the backup. As a result, the JWT token that get created when you peform a sign-in use API keys that are part of the backup. But if the API keys have changed in the updated app, they will be overwritten by the backup keys.
The solution is to delete the device's backup in Google Drive. I seriously believe that this feature of storing device settings in the Cloud is one of the dumbest things I've encountered. This is not the first time this has happened.
My question is concerning the Android app data backup feature configured by android:allowBackup in the manifest, as documented here. As I understand it, this backed-up app data is restored when the user uninstalls and later re-installs an app from the play store.
In this scenario, when exactly is the data restoration done? Is it:
During installation from Play Store, before user has ability to open app
After installation is complete, potentially allowing user to open app before the restore is done
Our users are on slow internet connections and a few have reported scenarios where data they entered shortly after a reinstall is replaced by old data from past backups. If the Google backups are to blame, this seems to suggest that the restore is done after install (#2 above), but I can't find concrete information to back this.
I'm slightly skeptical because this backup feature is enabled by default. If this overwriting can indeed happen on reinstalls, this would mean all android apps under android 6+ will have encountered issues where first-time setup data (auth tokens and such) is overwritten when a restore is applied. Does anyone have any links or anecdotal information on whether this theory is correct?
Auto backup in android
Check "Restore schedule" para which says that restore happens after the APK is installed, but before the app is available to be launched by the user. BTW if you want to handle Autobackup, you can follow the setup step on codelab Autobackup setup for Android Codelab
I am new to cordova app development and I am not sure how to approach this application workflow.
The workflow is that:
1. user download and installs the app
2. he ca use basic feature without registration
During this time (unregistered user with app installed) on backend we have to track the user activity and in case he register using email to upgrade his profile and keep his previous activity.
A solution to this will be to generate a user GUID on mobile when user first install the app. Send it to backend and use this as a future reference of the user.
Where can I store this GUID to be reliable and not to be cleared by the browser/application cache. If user clears the application data I would like the GUID to stay.
It will be great if this setting will stay if user upgrade the app or uninstall and reinstall later.
V Best,
Radu
You shouldn't storage data in a device when the user uninstall it, but if you still want it, check this plugin:
https://github.com/apache/cordova-plugin-file
You can save in different locations, even in the external storage of the device, which doesn't get deleted when the app is unistalled
Cordova unique device id plugin generate a UUID that remains the same after app uninstall and works on iOS and Android.
On iOS it generates a UUID and store it in the Keychain.
On Android it concatenates various IDs unique to the device but needs the android.permission.READ_PHONE_STATE permission.
I have followed the instructions here:
The developers of this app have not set up this app properly for Facebook Login?
Made my app public and the circle is green so the app is public.
But when I try to login, I go to the Facebook app, it asks me to login which I do and then I get this message:
App Not Setup: This app is still in development mode, and you don't have access to it. Switch to a registered test user or ask an app admin for permissions.
BTW: I am the admin
Any help is much appreciated. I am using SeattleClouds and this happens on both iOS and Android.
STEP 1:
In Settings -> Basic -> Contact Email. (Give your/any email)
STEP 2:
in 'App Review' Tab : change
Do you want to make this app and all its live features available to the general public? Yes
This is an answer I haven't seen much around (this it was in a comment somewhere) although yes taking the app off development mode will work this can be bad for security or really annoying if the app isn't ready yet but you need to submit the app for review on account of needing access to special permissions (e.g. user_birthday).
What I did instead to fix the error was go to https://developers.facebook.com/sa/apps/{appId}/roles/ or from the app dashboard click roles on the left side
Then add the user account(s) to either developer or tester. Developers will need to be verified by mobile and will get access to the app to make changes but a tester will only need to be verified by email (not sure if even this is necessary but it probably is) and will only be able to use the API instead of make changes to settings.
If the app is ready for the public, obviously just take the app off development mode.
Issue Log: App Not Setup. This app is still in development mode. and you dont have access to it. register test user or ask an app admin for permission
The app are not in Live Mode
You are not listed as admin or a tester in https://developers.facebook.com/app/yourapp
Your App Hashkey are not set. if Facebook app cant be on Live Mode you need a hashkey to test it. because the app are not yet Live. Facebook wont allow an access.
HOW TO CHANGE TO LIVE MODE
1. go to : https://developers.facebook.com
2. select your app on "My Apps" List
3. toggle the switch from OFF to ON
HOW TO ADD AS TEST OR ADMIN
1. go to : https://developers.facebook.com
2. select your app on "My Apps" List
3. go to : Roles > Roles > Press Add for example administrator
4. Search your new admin/tester Facebook account.
5. admin must enter facebook password to confirm.then submit
the new admin must go to developer.facebook page and accept the request
6. go to : https://developers.facebook.com
7. Profile > Requests > Confirm
8. Congratulation you have been assign as new Admin
HOW TO GET AND SET HASHKEY FOR DEVELOPMENT
as Refer to Facebook Login Documentation
https://developers.facebook.com/docs/android/getting-started/#create_hash
The most preferable solution by me is by code ( Troubleshooting Sample Apps )
it will print out the hash key. you can update it on
https://developers.facebook.com/apps/yourFacebookappID/settings/basic/
on Android > Key Hashes section
a step by step process on how to get the hashKey.
Firstly Add the code to any oncreate method
Run The app and Search the KeyHash at Logcat
step by step process on how Update on Facebook Developer.
Open Facebook Developer Page. You need access as to update the Facebook Developer page.https://developers.facebook.com
Follow the step as follow.
2021 UPDATE
I have done successfully Login with Facebook by doing below things. Now it is working fine.
As per described by George Mano
Visit Facebook Apps Page and select your application.
Go to Settings -> Basic.
Add a 1 Contact Email, 2 Privacy Policy URL, 3 User Data Deletion and choose 4 Category and Last 5. Live your application
The Privacy Policy URL should be a webpage where you have hosted the terms and conditions of your application and data used.
The General Data Protection Regulation (GDPR) requires developers to provide a way for people to request that their data be deleted. To be compliant with these requirements, you must provide either a data deletion request callback or instructions to inform people how to delete their data from your app or website
Toggle the button in the top of the screen, as seen below, in order to switch from Development to Live.
captain_a is right that your app needs to be public with a developer email address. But if you are still getting the error then make sure that your website is using an SSL certificate.
For more detailed information and workarounds please checkout my answer at Facebook app is Public, but gives error "App not setup" when logging in
I had the same problem and it took me around one hour to figure out where i went wrong only to note that i had used a wrong app id....just go to your code and used a correct id here
window.fbAsyncInit = function() {
FB.init({
appId : '1740077446229063',//your app id
cookie : true, // enable cookies to allow the server to access
// the session
xfbml : true, // parse social plugins on this page
version : 'v2.5' // use graph api version 2.5
});
2020 UPDATE
Visit https://developers.facebook.com/apps/ and select your application.
Go to Settings -> Basic. Add a Contact Email and a Privacy Policy URL. The Privacy Policy URL should be a webpage where you have hosted the terms and conditions of your application and data used.
Toggle the button in the top of the screen, as seen below, in order to switch from Development to Live.
I did what is written in this answer and still had the same problem, then I downloaded the facebook app, logged into my facebook admin account from my phone. TADAA! it worked.
When app is release some time that case
https://developers.facebook.com/apps/{$appid}/alerts/
"Your app has been placed into development mode due to an invalid Privacy Policy."
can change you app from release mode to development mode
so check the Privacy Policy
Go to Settings->Basic, on top you will find a Switch button which will say App is in development mode.
Click on in development switch button, it will ask you to make app live, and after providing all necessary things, it will become live.
Facebook and Instagram apis were perfectly working fine but they suddenly stopped working due to invalid privacy policy statement. Facebook deactivated api access.
From what I read on SO, it seems that I want the impossible (?)
I have a kiosk-like app that is supposed to run 24/24, 7/7, 365/365. This makes it hard/impossible to update the app. As far as I know, Google Play will not start the update (even if Autoupdate is set for my app) while my app is running.
I read across SO and several forums an found a lot of NO's and CON's. My current answer is that is not possible without rooting the device or without some system certificates and so on.
But still, I have the following scenario:
I created a google account myGoogleAccount#gmail.com
On my device I add this account and install my application from Google Play store.
On my desktop machine I log into GPlay with the same account and I go to my application and I see that my app is Installed. If I click on the Installed button I can see my device.
I publish a new version of the app, when the app becomes available, from my application's page open on desktop I can send a command to update the app.
I get the prompt to accept the terms bla-bla, and once I accept it, the app is automatically updated even if it is currently running.
Basically this is the behavior I am interested in. My question is: can I run this scenario from my device [invoking some GPlay api's] given the fact that I can provide the google account credentials to the app, so that no user intervention is required to update the app and to accept whatever unchanged permissions?