Skillz Methods

Skillz methods

Skillz.launch(this)
        
        Contract: launch(Activity) => void
        
        Launches the user into the Skillz interface.
Skillz.startMatch(this)
        
        Contract: startMatch(Activity) => void
        
        Needs to be called in the game activity that is launched from Skillz, before gameplay starts. 
        This should be called within the onStart() method of the game activity.
Skillz.reportScore(this, score)
        
        Contract: reportScore(Activity, BigDecimal) => void
        
        Ends the Skillz match in progress. Submits the user’s final score 
        and brings the user back into the Skillz interface.
Skillz.abortMatch(this)
        
        Contract: abortMatch(Activity) => void
        
        Ends as the Skillz match in progress as an abort. This should be called with the user 
        voluntarily forfeits the match. An “abort” score is the worst possible score.
Skillz.getRandom(this)
        
        Contract: getRandom(Activity) => Random
        
        Returns a Skillz-synced Random. This Random must be used to generate board state and any 
        other fairness-related parameters in a game. Values will be between all players in a match. 
        If this is called multiple times, the same Random instance is returned.
Skillz.isMatchInProgress()
        
        Contract: isMatchInProgress() => boolean
        
        Returns whether or not a Skillz match is in progress.
Skillz.updatePlayersCurrentScore(this, score)
        
        Contract: Skillz.updatePlayersCurrentScore(Activity, BigDecimal) => void
        
        Sends the player’s current score to the Skillz servers for fairness validation.
Skillz.getMatchRules()

        Contract: Skillz.getMatchRules() => HashMap<String,String>
        
        Returns a HashMap of game rules for the match the user entered.
Skillz.registerPushToken(this,pushToken)

        Contract: Skillz.registerPushToken(Context, String) => void
        
        Registers your existing push notification token with Skillz. Used for custom GCM implementations.
skillz.push.PushListenerService.handleSkillzPush(this,extras)

        Contract: com.skillz.push.PushListenerService.handleSkillzPush(Context, Bundle) => void
        
        Forwards a specific push notification to Skillz. Used for custom GCM implementations when your game already 
        handles GCM messages. Should be called when a push is received that your game does not 
        handle (e.g. a Skillz push). Extras is forwarded from the incoming message intent 
        (retrieve with intent.getExtras()).