Package com.gemalto.mfs.mwsdk.sdkconfig
Class AndroidContextResolver
- java.lang.Object
-
- com.gemalto.mfs.mwsdk.sdkconfig.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.
-
-
-
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 byContext.getApplicationContext()
from the context provided by MPA to SDK during the initialization. the SDK processes push request in the background, the context is theIntentService
that triggers the push handling.- Returns:
- Context
-
-