Skip to content

Current account

Serhii Petrosyuk edited this page Jun 12, 2019 · 2 revisions

To get the current Account call the getCurrentAccount() method in the SocialAuthManager. This method returns the LiveData with the Account value type.

val socialAuthManager = SocialAuthManager(/* context */)

socialAuthManager.getCurrentAccount().observe(this, Observer { account ->
    // Do your stuff with the current account
})

this represents the LifecycleOwner

Clone this wiki locally