3

If there is some sdk (let's assume facebook here) that is implemented in multiple apps.

Now facebook asks a login one time from the user (the first time user uses fcbk app/sk on device). Once logged in, if any app (in same device) tries to access the sdk again, it does not ask user to login again (but just the permissions).

How does Facebook/Google know that user is already logged in that device once? Do they store Mac address of device. Do they have some universal sharedprefs? Do they have db/file on local sdcard.

I want to create similar functionality for my app. Any help would be awesome.

1 Answer 1

2

The implementation is both simple and complicated, but generally it centers around registering an account with the AccountManager (http://developer.android.com/reference/android/accounts/AccountManager.html) which then handles authentication requests coming from other apps.

Here is a step-by-step that should still be current enough to get you started: http://www.finalconcept.com.au/article/view/android-account-manager-step-by-step-2

Sign up to request clarification or add additional context in comments.

3 Comments

wblaschko, this is exactly what i was looking for. much appreciated and many thanks
This was not an easy task. If anyone needs help with this please let me know
Agreed, the fundamentals are pretty easy, actually getting it working is another story. Glad you got it figured out!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.