public final class AlawarFramework extends Object
Modifier and Type | Method and Description |
---|---|
void |
cacheInterstitial(String anchorId)
Caches interstitial for provided anchor if any exists.
|
void |
clearCache() |
void |
onCreate(Activity activity,
String appId,
String appSignature)
This method must be called from
Activity.onCreate(android.os.Bundle) } method of activity |
void |
onDestroy(Activity activity)
This method must be called from onDestroy() method of activity
|
void |
onStart(Activity activity)
This method must be called from
onStart() method of activity |
void |
onStop(Activity activity)
This method must be called from
onStop() method of activity |
boolean |
registerObserver(AlawarObserver observer)
Register observer to get all information from asynchronous calls.
|
static AlawarFramework |
sharedFramework()
Get Alawar framework singleton
|
void |
showInterstitial(String anchorId)
Shows interstitial for provided anchor if any exists
|
void |
startSession()
Initialize session with Alawar, must be called after
onCreate(Activity, String, String) |
boolean |
unregisterObserver(AlawarObserver observer)
Unregister observer previously registered by
registerObserver(AlawarObserver) . |
public static AlawarFramework sharedFramework()
public void onCreate(Activity activity, String appId, String appSignature)
Activity.onCreate(android.os.Bundle)
} method of activityactivity
- current activityappId
- application idappSignature
- application signaturepublic void onStart(Activity activity)
onStart()
method of activityactivity
- current activitypublic void onStop(Activity activity)
onStop()
method of activityactivity
- current activitypublic void onDestroy(Activity activity)
activity
- current activitypublic void startSession()
onCreate(Activity, String, String)
public boolean registerObserver(AlawarObserver observer)
onStart()
method of activityobserver
- observer to be registeredpublic boolean unregisterObserver(AlawarObserver observer)
registerObserver(AlawarObserver)
. Better to be called from onStop()
method of activityobserver
- observer to be unregisteredpublic void cacheInterstitial(String anchorId)
showInterstitial(String)
anchorId
- anchor id as got from serverpublic void showInterstitial(String anchorId)
anchorId
- anchor id as got from serverpublic void clearCache()