Class AndroidContextResolver

java.lang.Object
com.gemalto.mfs.mwsdk.sdkconfig.AndroidContextResolver

public final class AndroidContextResolver extends Object
This utility class provides access to the application context. In Android, many important operations such as displaying toast and file access requires the context object. Usually the context is provided at the start of the application by MPA to SDK. However, since the SDK can be functioning in the background (receiving push notification and process to download cards or replenish keys), the MPA may not have the ability to directly access the context in those situations. Once the background process is complete, the MPA may wish to notify End-User, thus requiring access to the current context. This class is to cater for such cases.
  • Method Details

    • getApplicationContext

      public static android.content.Context getApplicationContext()
      Gets the current application context object. If the application is started in the foreground, the context derived by Context.getApplicationContext() from the context provided by MPA to SDK during the initialization. the SDK processes push request in the background, the context is the IntentService that triggers the push handling.
      Returns:
      Context