Class AndroidContextResolver


  • public final class AndroidContextResolver
    extends java.lang.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 Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static android.content.Context getApplicationContext()
      Gets the current application context object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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