LiSession Reference
Package: com.applicasa.ApplicasaManager
Declared In: com.applicasa.ApplicasaManager.LiSession
Overview
Class for managing user sessions and gameplay.
Tasks
Handling Sessions
sessionStart(Context, LiPromotionCallback)
sessionResume(Context)
sessionEnd(Context)
Handling Gameplay
gameStart(String, LiPromotionCallback)
gamePause
gameResume
gameFinished(LiGameResult, int, int, int, int)
Class Methods
sessionStart(Context, LiPromotionCallback)
Method to start an app session.
public static void sessionStart(Context context, LiPromotionCallback promotionCallback)
Parameters:
context
The application Context object.
promotionCallback
An LiPromotionCallback object that will handle responding to any available promotions tied to session start events.
sessionResume(Context)
Method to resume a previously active app session.
public static void sessionResume(Context context)
Parameters:
context
The application Context object.
sessionEnd(Context)
Method to end an active app session.
public static void sessionEnd(Context context)
Parameters:
context
The application Context object.
gameStart(String, LiPromotionCallback)
Method to start a new game or level.
public static void gameStart(String gameName, LiPromotionCallback promotionCallback)
Parameters:
gameName
A String identifier to indicate the game or level started.
promotionCallback
An LiPromotionCallback object that will handle responding to any available promotions tied to game or level start events.
gamePause
Method to pause an active game or level.
public static void gamePause()
gameResume
Method to resume a previously active game or level.
public static void gameResume()
gameFinished(LiGameResult, int, int, int, int)
Method to complete a game or level playthrough.
public static void gameFinished(LiGameResult liGameResult, int mainCurrency,int secondaryCurrency, int score, int bonus,LiPromotionCallback promotionCallback)
Parameters:
liGameResult
An LiGameResult enum value indicating the result of the user's playthrough. Available values are WIN, LOSE, or EXIT.
mainCurrency
An int value indicating the user's ending main currency balance.
secondaryCurrency
An int value indicating the user's ending secondary currency balance.
score
An int value indicating the user's final score at game's end.
bonus
An int value indicating any potential bonus score granted to the user at game's end.
promotionCallback
An LiPromotionCallback object that will handle responding to any available promotions tied to game or level finish events.