PlayServicesDriveAuthManager

Constructors

Link copied to clipboard
constructor(context: Context)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun authorize(): AuthorizeOutcome

Request the drive.appdata scope. Returns AuthorizeOutcome.Authorized when consent already exists (silent), or AuthorizeOutcome.NeedsConsent carrying an IntentSender the UI must launch.

Link copied to clipboard

Returns a drive.appdata access token without UI, or throws if consent has not been granted yet. Use from headless paths (e.g. the dust backup coordinator during a routine refresh) — the first-time consent must come from a UI flow (DriveAuthManager.authorize + launching the IntentSender).

Link copied to clipboard
open override fun tokenFromConsent(data: Intent?): DriveAuth

Extract the token from the consent activity result Intent.