public interface

MAMActivityIdentityRequirementListener

com.microsoft.intune.mam.client.app.MAMActivityIdentityRequirementListener
Known Indirect Subclasses

Class Overview

Allows an app to respond to requests to switch identity.

Summary

Public Methods
abstract void onMAMIdentitySwitchRequired(String identity, AppIdentitySwitchReason reason, AppIdentitySwitchResultCallback callback)
abstract void onMAMIdentitySwitchRequired(String upn, String oid, AppIdentitySwitchReason reason, AppIdentitySwitchResultCallback callback)
Called by MAM to notify the app that an incoming intent requires an identity switch for this Activity.

Public Methods

public abstract void onMAMIdentitySwitchRequired (String identity, AppIdentitySwitchReason reason, AppIdentitySwitchResultCallback callback)

This method is deprecated.
Use onMAMIdentitySwitchRequired(String, String, AppIdentitySwitchReason, AppIdentitySwitchResultCallback).

Called by MAM to notify the app that an incoming intent requires an identity switch for this Activity. This can occur during activity creation or when a new intent is sent to an existing activity. The application must call callback.reportIdentitySwitchResult to tell MAM whether the identity switch is allowed. In general, applications should allow identity switches. The default implementation allows all identity switches. When using the build plugin, the default implementation can be accessed by calling MAMctivity.defaultOnMAMIdentitySwitchRequired. The most common case for this method to be called is before onMAMCreate. The application is allowed to show UI to confirm the identity switch, but it must show the UI using a different activity as onMAMCreate will not be called for this activity until the identity switch is allowed. Special care must be taken with single-top activities when a new intent can cause an identity switch. If a new intent causes an identity switch, after the switch is approved by this method, onMAMNewIntent will be called and then recreate() will be called which is necessary to enforce screenshot restrictions from the new policy. It is strongly recommended that the implementation of onMAMNewIntent call setIntent, as otherwise the following recreate may cause the original intent rather than the new intent to be displayed.

Parameters
identity identity being switched to
reason reason identity is being switched
callback must be called to notify MAM whether to allow the switch.

public abstract void onMAMIdentitySwitchRequired (String upn, String oid, AppIdentitySwitchReason reason, AppIdentitySwitchResultCallback callback)

Called by MAM to notify the app that an incoming intent requires an identity switch for this Activity. This can occur during activity creation or when a new intent is sent to an existing activity. The application must call callback.reportIdentitySwitchResult to tell MAM whether the identity switch is allowed. In general, applications should allow identity switches. The default implementation allows all identity switches. When using the build plugin, the default implementation can be accessed by calling MAMctivity.defaultOnMAMIdentitySwitchRequired. The most common case for this method to be called is before onMAMCreate. The application is allowed to show UI to confirm the identity switch, but it must show the UI using a different activity as onMAMCreate will not be called for this activity until the identity switch is allowed. Special care must be taken with single-top activities when a new intent can cause an identity switch. If a new intent causes an identity switch, after the switch is approved by this method, onMAMNewIntent will be called and then recreate() will be called which is necessary to enforce screenshot restrictions from the new policy. It is strongly recommended that the implementation of onMAMNewIntent call setIntent, as otherwise the following recreate may cause the original intent rather than the new intent to be displayed.

Parameters
upn UPN of the identity being switched to
oid AAD OID of the identity being switched to
reason reason identity is being switched
callback must be called to notify MAM whether to allow the switch.