HIVE SDK for C++

Classes | Typedefs | Functions
ProviderGoogle

You can use achievements and leaderboards within Google Play Games. More...

Classes

class  ProviderGoogle
 You can use achievements and leaderboards within Google Play Games. More...
 

Typedefs

typedef std::function< void(ResultAPI const &result)> ProviderGoogle::onLeaderboardsResult
 Google Play Games 리더보드 UI 노출 result handler. More...
 
typedef std::function< void(ResultAPI const &result)> ProviderGoogle::onAchievementsResult
 Google Play Games 업적 UI 노출 result handler. More...
 
typedef std::function< void(ResultAPI const &result, std::string const &googlePlayerId, std::string const &authCode)> ProviderGoogle::onGooglePlayerIdResult
 Google Player Id 및 Auth Code 반환 result handler. More...
 

Functions

static void ProviderGoogle::achievementsReveal (const std::string achievementId)
 It show hidden achievements. More...
 
static void ProviderGoogle::achievementsReveal (const std::string achievementId, onAchievementsResult listener)
 It show hidden achievements. More...
 
static void ProviderGoogle::achievementsUnlock (const std::string achievementId)
 It achieve achievements. More...
 
static void ProviderGoogle::achievementsUnlock (const std::string achievementId, onAchievementsResult listener)
 It achieve achievements. More...
 
static void ProviderGoogle::achievementsIncrement (const std::string incrementalAchievementId, const int argValue)
 It increases achievement figures. More...
 
static void ProviderGoogle::achievementsIncrement (const std::string incrementalAchievementId, const int argValue, onAchievementsResult listener)
 It increases achievement figures. More...
 
static void ProviderGoogle::leaderboardsSubmitScore (const std::string leaderboardId, const long long score)
 It update the leaderboard score. More...
 
static void ProviderGoogle::leaderboardsSubmitScore (const std::string leaderboardId, const long long score, onLeaderboardsResult listener)
 It update the leaderboard score. More...
 
static void ProviderGoogle::showLeaderboard (onLeaderboardsResult listener)
 It shows Google Leaderboard UI. More...
 
static void ProviderGoogle::showAchievements (onAchievementsResult listener)
 It shows the Google achievement UI. More...
 
static void ProviderGoogle::getGooglePlayerId (onGooglePlayerIdResult listener)
 It get Google PlayerId and authCode. More...
 

Detailed Description

You can use achievements and leaderboards within Google Play Games.


If it is not connected to Google Play Games, it will try to connect automatically when calling API.
It can be used independently regardless of AuthV4 Connect.
Even if automatic connection is made, it is not connected with the current playerId.

Created by hife on 2017. 6. 7.

Author
hife
Since
4.3.0

Typedef Documentation

◆ onAchievementsResult

typedef std::function<void(ResultAPI const & result)> ProviderGoogle::onAchievementsResult

Google Play Games 업적 UI 노출 result handler.

Parameters
resultAPI 호출 결과.
See also
ResultAPI

◆ onGooglePlayerIdResult

typedef std::function<void(ResultAPI const & result, std::string const & googlePlayerId, std::string const & authCode)> ProviderGoogle::onGooglePlayerIdResult

Google Player Id 및 Auth Code 반환 result handler.

Parameters
resultAPI 호출 결과.
googlePlayerIdGoogle PlayerId
authCodeAuth Code

◆ onLeaderboardsResult

typedef std::function<void(ResultAPI const & result)> ProviderGoogle::onLeaderboardsResult

Google Play Games 리더보드 UI 노출 result handler.

Parameters
resultAPI 호출 결과.
See also
ResultAPI

Function Documentation

◆ achievementsIncrement() [1/2]

static void ProviderGoogle::achievementsIncrement ( const std::string  incrementalAchievementId,
const int  argValue 
)
static

It increases achievement figures.


Achievement figures is added as much as value set by the API call, not by setting.
If the total sum is Max, the achievement is automatically accomplished.

Parameters
incrementalAchievementIdincrementalAchievementId
valuevalue

◆ achievementsIncrement() [2/2]

static void ProviderGoogle::achievementsIncrement ( const std::string  incrementalAchievementId,
const int  argValue,
onAchievementsResult  listener 
)
static

It increases achievement figures.


Achievement figures is added as much as value set by the API call, not by setting.
If the total sum is Max, the achievement is automatically accomplished.

Parameters
incrementalAchievementIdincrementalAchievementId
valuevalue
listenerGoogleAchievementsListener

◆ achievementsReveal() [1/2]

static void ProviderGoogle::achievementsReveal ( const std::string  achievementId)
static

It show hidden achievements.


Achievements are only revealed at 0%, not achieved.

Parameters
achievementIdachievementId to reveal

◆ achievementsReveal() [2/2]

static void ProviderGoogle::achievementsReveal ( const std::string  achievementId,
onAchievementsResult  listener 
)
static

It show hidden achievements.


Achievements are only revealed at 0%, not achieved.

Parameters
achievementIdachievementId to reveal
listenerGoogleAchievementsListener

◆ achievementsUnlock() [1/2]

static void ProviderGoogle::achievementsUnlock ( const std::string  achievementId)
static

It achieve achievements.


Whether hidden or open, achievement is achieved at 100%.

Parameters
achievementIdachievementId to achieve

◆ achievementsUnlock() [2/2]

static void ProviderGoogle::achievementsUnlock ( const std::string  achievementId,
onAchievementsResult  listener 
)
static

It achieve achievements.


Whether hidden or open, achievement is achieved at 100%.

Parameters
achievementIdachievementId to achieve
listenerGoogleAchievementsListener

◆ getGooglePlayerId()

static void ProviderGoogle::getGooglePlayerId ( onGooglePlayerIdResult  listener)
static

It get Google PlayerId and authCode.

Parameters
listeneronGooglePlayerIdResult

◆ leaderboardsSubmitScore() [1/2]

static void ProviderGoogle::leaderboardsSubmitScore ( const std::string  leaderboardId,
const long long  score 
)
static

It update the leaderboard score.


The score corresponding to the leaderboardId is updated with the score value.

Parameters
leaderboardIdleaderboardId
scorescore

◆ leaderboardsSubmitScore() [2/2]

static void ProviderGoogle::leaderboardsSubmitScore ( const std::string  leaderboardId,
const long long  score,
onLeaderboardsResult  listener 
)
static

It update the leaderboard score.


The score corresponding to the leaderboardId is updated with the score value.

Parameters
leaderboardIdleaderboardId
scorescore
listenerGoogleLeaderboardsListener

◆ showAchievements()

static void ProviderGoogle::showAchievements ( onAchievementsResult  listener)
static

It shows the Google achievement UI.


Parameters
listenerGoogleAchievementsListener

◆ showLeaderboard()

static void ProviderGoogle::showLeaderboard ( onLeaderboardsResult  listener)
static

It shows Google Leaderboard UI.

Parameters
listenerGoogleLeaderboardsListener
Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy