java.lang.Object | |
↳ | com.microsoft.intune.mam.client.identity.MAMPolicyManager |
Allows multi-identity apps to specify the current identity, which will determine the active policy. Allows all apps to retrieve the active policy, or the policy for a specific identity.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static void |
bypassConditionalLaunchChecks(Activity activity)
Allow the given Activity to bypass conditional launch checks.
| ||||||||||
static String |
getCurrentIdentity(Context context)
Computes the current effective identity that will be used for policy.
| ||||||||||
static String |
getCurrentThreadIdentity()
Get the current thread identity.
| ||||||||||
static AppPolicy |
getCurrentThreadPolicy()
Get the current app policy.
| ||||||||||
static boolean | getIsIdentityManaged(String identity) | ||||||||||
static AppPolicy |
getPolicy(Context context)
Get the current app policy.
| ||||||||||
static AppPolicy |
getPolicy()
Deprecated alias for getCurrentThreadPolicy.
| ||||||||||
static AppPolicy |
getPolicyForIdentity(String identity)
Get the applicable app policy for a given identity.
| ||||||||||
static String |
getProcessIdentity()
Get the process-wide identity.
| ||||||||||
static String |
getUIPolicyIdentity(Context context)
Get the current UI identity.
| ||||||||||
static MAMIdentitySwitchResult |
setCurrentThreadIdentity(String identity)
Set the current thread identity.
| ||||||||||
static MAMIdentitySwitchResult |
setProcessIdentity(String identity)
Set the process-wide identity.
| ||||||||||
static void |
setUIPolicyIdentity(Context context, String identity, MAMSetUIIdentityCallback mamSetUIIdentityCallback)
Set the associated identity with the Context.
| ||||||||||
static void |
setUIPolicyIdentity(Context context, String identity, MAMSetUIIdentityCallback mamSetUIIdentityCallback, EnumSet<IdentitySwitchOption> options)
Set the associated identity with the Context.
| ||||||||||
static void |
showDiagnostics(Context context)
Display the Intune Diagnostics screen.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Allow the given Activity to bypass conditional launch checks. This must be called before onMAMCreate, e.g. from the Activity's constructor or attachBaseContext() override. Because this method allows the bypass of conditional launch policy checks, it should only be used after consulting with Microsoft to confirm there is no other supported way to achieve your app’s desired behavior.
activity | The activity to exempt from the launch checks. |
---|
Computes the current effective identity that will be used for policy. The following identity sources are considered in order 1. Thread 2. Context (UI identity) 3. Process 4. Default (empty string for multi-identity apps or apps with no policy, managed user for single-identity apps)
context | context to check identity on for (2) above |
---|
Get the current thread identity.
Get the current app policy. This does NOT take the UI (Context) identity into account. To take UI identity into account, use the override which takes a Context.
identity | identity |
---|
Get the current app policy.
context | for which the policy will be applicable. This is used to retrieve the UI identity. |
---|
Deprecated alias for getCurrentThreadPolicy.
Get the applicable app policy for a given identity.
identity | Identity to get policy for. |
---|
Get the process-wide identity.
Get the current UI identity.
context | Context to get the identity from. |
---|
Set the current thread identity.
identity | Identity to set. If null, the current thread identity is cleared. |
---|
Set the process-wide identity.
identity | New process-wide identity. If null, the process identity is cleared. |
---|
Set the associated identity with the Context.
context | Context to set the identity in. |
---|---|
identity | New identity to set. If null, the Context identity is cleared. |
mamSetUIIdentityCallback | callback to notify the application the identity switch result. May be null. |
Set the associated identity with the Context.
context | Context to set the identity in. |
---|---|
identity | New identity to set. If null, the Context identity is cleared. |
mamSetUIIdentityCallback | callback to notify the application the identity switch result. May be null. |
options | Identity switch options. |
Display the Intune Diagnostics screen.
context | App's context. |
---|