Allow my android application authenticate with google account - android

I want my users to identify with google account n my app.
i know that with AccountManager.getAccountsByType("com.google") i can get all google account and let the users choice one of them but if the user want use other account, how i do?
which is the correct flow for identify a user using the AccountManager?

Use AccountPicker.newChooseAccountIntent(). It creates a dialog which lets you choose which account to use and provides functionality to create a new one.

Related

Can I create Gmail account programmatically in Android studio?

Is possible to create Gmail account programmatically legally, not for business use , only creation.
I want to get data from My edit text and put it to any where(api) and api create account automatic or ask for capcha(Internally-no problem) and response should be gmail account and password??
I want to get data from My EditTexts and put it to any where(apis) and api to create account automatic or ask for capcha(Internally-no problem) and then create and response should be gmail account and password??
There is no Google api that would allow you to programmatically create a new google user.
Tbh I don't know of any authentication server or system that would allow for it.
Just consider the number of Spam bot accounts you would end up with.

Google Pay API - Insert a Pass to the Google Pay App without the JWT

As the title suggest, I need help regarding the insertion of a Pass object into the Google Pay App (Android App) without the need for the user to go through the received JWT on the custom client App.
The scenario which I am following is the one based on the description on the Google site. In this approach, a class and an object are created and inserted on the custom Server side based on the request from the Android Client App. As a response, a JWT token created using the Google Pay API is returned on which the user needs to click and link itself with the Google Pay App (hence, to further click "Save" to actually save the pass).
Is it possible to directly insert the object and link it with the Google Pay account without receiving first the JWT and requiring the user to handle it?
The idea is to process this in the background when the local ticket is created and to free the user from always having to save each individual Ticket.
It is not possible, the user has to explicitly save the pass. However you can group event tickets as per the docs and have multiple tickets saved in one button.

What is the best way to authenticate user in a Android app?

I'm a bit confused about the differents way to authenticate user on Android devices.
What is the best way to authenticate user in a Android app, in order to call a custom server REST API?
Use GoogleAuthUtil like described in these documents:
http://developer.android.com/google/auth/http-auth.html#ExtendAsyncTask
http://android-developers.blogspot.fr/2013/01/verifying-back-end-calls-from-android.html
Pro:
Quick login, user has not to type password nor to click on a button
Con:
Not corss-platform
Use Google Sign-In like described on this document:
https://developers.google.com/identity/sign-in/android/sign-in#cross-platform_single_sign_on
Pro:
Cross-platform
Con:
User has to click on the Google Sign-In button
It's possible to easily combine the two way, GoogleAuthUtil when users use Android device and Google sign*in when users are on other platform ?
What do you mean with cross platform, if you use GoogleAuthUtil and Google SignIn button they are both for Android. You can use them both to achive this, just authenticate first time with Google SignIn button, and then save account (so it doesn't ask you which account you want to use for authentication) and access token to SharedPreferences and reuse it for next login (without clicking on SignIn button again)

Which service use to avoid user to create an account

I'd like to allow users to login to my application through Facebook and/or Google account as seen in different apps. I saw the different api from facebook and google to do that but it looks like it is used for social interaction and i don't need it (like posting on a wall). It just for them to avoid any creation of account and for me to be sure to have a secured login mechanism.
Is that the correct tools?
U need single sign on. I would not be very specific on this. So you may try this as a reference https://developers.facebook.com/blog/post/640/
Hope it helps!

Use the Google account sign in authentication for apps in Android

I am creating an app which needs sign-in. On the desktop (full) website, he can sign-in with the existing Google account. On mobiles, how can I make the user sign-in with the Google account using on his android phone.
Will Android allow me to use his existing Google account to sign into my app?
Thanks.
You're probably not using the app engine, but I think there must be a way to use this example up to a point. I think that if you get to the point where you're calling:
accountManager.getAuthToken(account, "ah", false, new GetAuthTokenCallback(), null);
and then processing the callback, you should be able to determine if the user has logged in based on whether a login intent comes back or the user token comes back. If you're not going to use the token you can just disregard it, knowing the user has authenticated their account. Sorry if this isn't helpful. That's my experience with the AccountManager as of yet.
http://blog.notdot.net/2010/05/Authenticating-against-App-Engine-from-an-Android-app

Categories

Resources