Download google login page if user is not registered

In my Android application, there are some in-app purchases that the user can make, but if the application is running on the device without logging in, invoice v3 API simply returns error 3 "BILLING_UNAVAILABLE"
In this case, my main options is a pop-up message box, so that the user can log in and go to the google account, but this is rather cumbersome. Is there a way to simply open the google login page for a user?
I see applications that use the "Game Services" api (Achievements, Leaders, etc.), but this application still does not.

+4
source share
1 answer

When you get the answer BILLING_UNAVAILABLE, you can try something like this to start adding the Google Account stream:

Intent intent = new Intent(Settings.ACTION_ADD_ACCOUNT);
intent.putExtra(Settings.EXTRA_ACCOUNT_TYPES, new String[] {"com.google"});
startActivity(intent);
+1
source

Source: https://habr.com/ru/post/1621453/


All Articles