BrowserTabActivity Class

  • java.lang.Object
    • Activity
      • com.microsoft.identity.client.BrowserTabActivity

public class BrowserTabActivity

MSAL activity class (needs to be public in order to be discoverable by the os) to get the browser redirect with auth code from authorize endpoint. This activity has to be exposed by "android:exported=true", and intent filter has to be declared in the manifest for the activity.

When the AuthorizationAgent is launched, and we're redirected back with the redirect uri (the redirect must be unique across apps on a device), the os will fire an intent with the redirect, and the BrowserTabActivity will be launched.

<intent-filter>
&lt;action android:name="android.intent.action.VIEW" /&gt;</pre></p>

    To receive implicit intents, have to put the activity in the category of default.

    <category android:name="android.intent.category.DEFAULT" />

    The target activity allows itself to be started by a web browser to display data.

    <category android:name="android.intent.category.BROWSABLE" />

    BrowserTabActivity will be launched when matching the custom url scheme.

    <data android:scheme="msalclientid" android:host="auth" />

</intent-filter>

Method Summary

Modifier and Type Method and Description
void onCreate(final Bundle savedInstanceState)

Method Details

onCreate

protected void onCreate(final Bundle savedInstanceState)

Parameters:

savedInstanceState

Applies to