Android app login with Google Account
You might want to authenticate the user using one of the google account already configured in your device like some of the apps do, for that follow the below link -
"Authenticating to OAuth2 Services" - link
Download Sample from Google - Android SDK Manager/Extras/Google Play Services
In simple steps it does
Shows list of accounts in your mobile
Generates access token from selected accounts
Gets the Account name from access token by contacting google services(seperate call) to just tell that it has authenticated.
This is another link which is good in explaining the process link
you can follow below steps for Login in your app
you will send the generated access token to your Back-end server
Back-end server checks that access token is valid or not by contacting google services by this url
Next Back-end server responds to app whether to make the user login or not.
Below is response format of above "userinfo" call
you 'll get response as below
{
"id": "ID",
"name": "NAME",
"given_name": "GiVEN NAME",
"family_name": "FAMILY_NAME",
"link": "https://plus.google.com/ID",
"picture": "https://PHOTO.jpg",
"gender": "GENDER",
"locale": "LOCALE"
}
If you want Email id along with that response you have to modify
SCOPE = "oauth2:https://www.googleapis.com/auth/userinfo.profile";
to
SCOPE = "oauth2:https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email";
in that sample.
source
Android Application let specific users access it
You can do this easily using Firebase Authentication. Here is the documentation for it.
Just connect your app to Firebase, create login screen with Activity and create accounts with the usernames and passwords for your users and give them the credentials.
As for the Google Play billing policies, I believe this violates their rule that you should only get paid through Google Play so they get 30% of the income, however, if it all happens outside of the app, and there are no platforms to get paid through (like PayPal) integrated in the app itself, it shouldn't be a problem as far as I know.
Related Topics
Missing Styles. Is the Correct Theme Chosen for This Layout
Libgdx Spritebatch Render to Texture
Android Application Class Lifecycle
Error:Unexpected Lock Protocol Found in Lock File. Expected 3, Found 0
Live Audio Recording and Playing in Android and Thread & Callback Handling
Android Alternate Row Colors in Listview
How to Open Private Files Saved to the Internal Storage Using Intent.Action_View
Get Android Google Analytics Referrer Tag
Custom Layout That Rounds the Corners of Its Content
Android Saving Bitmap to Sd Card
Filter Output in Logcat by Tagname
Using Google Account to Log in to an Android Application
How to Notify Users About an Android App Update
How to Iterate Through All Keys of Shared Preferences
Send a Notification When the App Is Closed