public final class ContextHelper
extends java.lang.Object
The context of your application has to be set in setContext(Context)
once
before any other class is used.
Modifier and Type | Method and Description |
---|---|
android.content.Context |
getContext()
Returns the context of the application.
|
void |
setContext(android.content.Context context)
Stores the context of the application and make it available within the SDK.
|
static ContextHelper |
sharedInstance()
Returns an instance of a new
ContextHelper object. |
public static ContextHelper sharedInstance()
ContextHelper
object.ContextHelper
object.public void setContext(android.content.Context context)
context
- the context of the applicationjava.lang.IllegalArgumentException
- if passed context is nullpublic android.content.Context getContext() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if context is null