public abstract class

MAMService

extends Service
implements HookedService
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ com.microsoft.intune.mam.client.app.MAMService

Class Overview

MAM version of android.app.Service.

Summary

[Expand]
Inherited Constants
From class android.app.Service
From class android.content.Context
From interface android.content.ComponentCallbacks2
Public Constructors
MAMService()
Public Methods
final IBinder onBind(Intent intent)
void onMAMIdentitySwitchRequired(String identity, AppIdentitySwitchResultCallback callback)
Called by MAM to notify the app that an incoming intent requires a temporary identity switch on this thread.
void onMAMStart(Intent intent, int startId)
MAM version of onStart.
int onMAMStartCommand(Intent intent, int flags, int startId)
MAM version of onStartCommand.
final void onStart(Intent intent, int startId)
final int onStartCommand(Intent intent, int flags, int startId)
Protected Methods
void attachBaseContext(Context context)
[Expand]
Inherited Methods
From class android.app.Service
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2
From interface com.microsoft.intune.mam.client.app.HookedService
From interface com.microsoft.intune.mam.client.app.MAMIdentityRequirementListener

Public Constructors

public MAMService ()

Public Methods

public final IBinder onBind (Intent intent)

public void onMAMIdentitySwitchRequired (String identity, AppIdentitySwitchResultCallback callback)

Called by MAM to notify the app that an incoming intent requires a temporary identity switch on this thread. 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. Service calls will block until the callback is made. For services which run on the UI thread, the callback must be made before this function returns, otherwise the application will be nonresponsive. If a FAILED result is reported, then the service operation that initiated the identity switch will be cancelled. Activities should instead override the three-argument version of this method from MAMActivityIdentityRequirementListener.

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

public void onMAMStart (Intent intent, int startId)

MAM version of onStart.

Parameters
intent See onStart.
startId See onStart.

public int onMAMStartCommand (Intent intent, int flags, int startId)

MAM version of onStartCommand.

Parameters
intent See onStartCommand.
flags See onStartCommand.
startId See onStartCommand.
Returns
  • See onStartCommand.

public final void onStart (Intent intent, int startId)

public final int onStartCommand (Intent intent, int flags, int startId)

Protected Methods

protected void attachBaseContext (Context context)