HIVE SDK for Android

Classes | Functions | Variables
AuthV4Helper

Provides advanced features of HIVE Authentication. More...

Classes

interface  com.hive.AuthV4.Helper.AuthV4HelperListener
 AuthV4Helper API request result callback. More...
 
class  com.hive.AuthV4.Helper.ConflictSingleViewInfo
 The class showing the conflicted account's game data when user accounts conflict
More...
 

Functions

static void com.hive.AuthV4.Helper.syncAccount (ProviderType providerType, AuthV4HelperListener listener)
 Helps to inform whether accounts conflict or not when executing the provided as well as other APIs. More...
 
static void com.hive.AuthV4.Helper.signIn (final AuthV4.Helper.AuthV4HelperListener listener)
 Player sign-in

Condition of use

  1. Complete to initialize HIVE SDK

    Key result code

More...
 
static void com.hive.AuthV4.Helper.signOut (final AuthV4.Helper.AuthV4HelperListener listener)
 Player sign-out

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

More...
 
static void com.hive.AuthV4.Helper.connect (AuthV4.ProviderType providerType, final AuthV4.Helper.AuthV4HelperListener listener)
 Provider Connection

Condition of use

  1. Compelte to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

More...
 
static void com.hive.AuthV4.Helper.disconnect (AuthV4.ProviderType providerType, final AuthV4.Helper.AuthV4HelperListener listener)
 Connects Provider

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

More...
 
static void com.hive.AuthV4.Helper.showLeaderboard (final AuthV4.Helper.AuthV4HelperListener listener)
 Queries leaderboard

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Refernce

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.
More...
 
static void com.hive.AuthV4.Helper.leaderboardsSubmitScore (String leaderboardId, long score)
 It update the leaderboard score. More...
 
static void com.hive.AuthV4.Helper.leaderboardsSubmitScore (String leaderboardId, long score, final AuthV4.Helper.AuthV4HelperListener listener)
 It update the leaderboard score. More...
 
static void com.hive.AuthV4.Helper.showAchievements (final AuthV4.Helper.AuthV4HelperListener listener)
 Queries Acheivements

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.
More...
 
static void com.hive.AuthV4.Helper.achievementsReveal (String achievementId)
 Reveal hidden achievement. More...
 
static void com.hive.AuthV4.Helper.achievementsReveal (String achievementId, final AuthV4.Helper.AuthV4HelperListener listener)
 Reveal hidden achievement. More...
 
static void com.hive.AuthV4.Helper.achievementsUnlock (String achievementId)
 Unlock achievement. More...
 
static void com.hive.AuthV4.Helper.achievementsUnlock (String achievementId, final AuthV4.Helper.AuthV4HelperListener listener)
 Unlock achievement. More...
 
static void com.hive.AuthV4.Helper.achievementsIncrement (String incrementalAchievementId, int value)
 Increases achievement figures. More...
 
static void com.hive.AuthV4.Helper.achievementsIncrement (String incrementalAchievementId, int value, final AuthV4.Helper.AuthV4HelperListener listener)
 Increases achievement figures. More...
 
static void com.hive.AuthV4.Helper.showConflict (final AuthV4.Helper.AuthV4HelperListener listener)
 Displays conflict status, and HIVE UI avilable to select an account. More...
 
static void com.hive.AuthV4.Helper.showConflict (ConflictSingleViewInfo conflictData, final AuthV4.Helper.AuthV4HelperListener listener)
 Displays conflict status, and HIVE UI which is available to select an account as well as shows game information. More...
 
static void com.hive.AuthV4.Helper.switchAccount (final AuthV4.Helper.AuthV4HelperListener listener)
 If accounts conflict, sign out the current player
and try to sign in with the account signed in on the user device. More...
 
static void com.hive.AuthV4.Helper.resolveConflict (final AuthV4.Helper.AuthV4HelperListener listener)
 In case it is not changed the currently signed-in account after accounts conflict. More...
 
static ArrayList< AuthV4.ProviderType > com.hive.AuthV4.Helper.getIDPList ()
 Receives the Provider lists sent by SDK. More...
 

Variables

 com.hive.AuthV4.AuthV4MaintenanceActionType.OPEN_URL =(1)
 외부 브라우저로 전달된 url 을 실행
 
 com.hive.AuthV4.AuthV4MaintenanceActionType.EXIT =(2)
 앱 종료
 
 com.hive.AuthV4.AuthV4MaintenanceActionType.DONE =(3)
 아무 처리도 하지 않음.
 
String com.hive.AuthV4.AuthV4MaintenanceInfo.title
 Title.
 
String com.hive.AuthV4.AuthV4MaintenanceInfo.message
 Contents.
 
String com.hive.AuthV4.AuthV4MaintenanceInfo.button
 Text on the button ex) OK.
 
AuthV4MaintenanceActionType com.hive.AuthV4.AuthV4MaintenanceInfo.action
 Actions to be taken when the button is tapped.
 
String com.hive.AuthV4.AuthV4MaintenanceInfo.url
 URL to be browsed when action is OPEN_URL.
 
int com.hive.AuthV4.AuthV4MaintenanceInfo.remainingTime
 When action is EXIT, the time in seconds remaining until the maintenance completes. The time is updated in real time, and the app will be closed at 0 seconds.
 
String com.hive.AuthV4.AuthV4MaintenanceInfo.startDate
 Maintenance start time YYYY-mm-dd HH:ii.
 
String com.hive.AuthV4.AuthV4MaintenanceInfo.endDate
 Maintenance end time YYYY-mm-dd HH:ii.
 
String com.hive.AuthV4.AuthV4MaintenanceInfo.customerButton
 Customer service text.
 
String com.hive.AuthV4.AuthV4MaintenanceInfo.customerLink
 Customer service link.
 

Detailed Description

Provides advanced features of HIVE Authentication.



The detailed functions provided by this class are as follows.

Function Documentation

§ achievementsIncrement() [1/2]

static void com.hive.AuthV4.Helper.achievementsIncrement ( String  incrementalAchievementId,
int  value 
)
static

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.

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.

Parameters
incrementalAchievementIdachievements's key value
valuevalue

§ achievementsIncrement() [2/2]

static void com.hive.AuthV4.Helper.achievementsIncrement ( String  incrementalAchievementId,
int  value,
final AuthV4.Helper.AuthV4HelperListener  listener 
)
static

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.

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.

    Key result code

ErrorCode Code Description Solution
SUCCESS Success Succeeded to request achievementsIncrement
-
RESPONSE_FAIL AuthV4GoogleResponseFailAchievementsIncrement Failed to request achievementsIncrement -
Parameters
incrementalAchievementIdachievements's key value
valuevalue
listenerAuthV4Helper achievementsIncrement result callback

§ achievementsReveal() [1/2]

static void com.hive.AuthV4.Helper.achievementsReveal ( String  achievementId)
static

Reveal hidden achievement.

Achievements are only revealed at 0%, not achieved.

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.

Parameters
achievementIdachievements's key value

§ achievementsReveal() [2/2]

static void com.hive.AuthV4.Helper.achievementsReveal ( String  achievementId,
final AuthV4.Helper.AuthV4HelperListener  listener 
)
static

Reveal hidden achievement.

Achievements are only revealed at 0%, not achieved.

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.

    Key result code

ErrorCode Code Description Solution
SUCCESS Success Succeeded to request achievementsReveal
-
RESPONSE_FAIL AuthV4GoogleResponseFailAchievementsReveal Failed to request achievementsReveal -
Parameters
achievementIdachievements's key value
listenerAuthV4Helper achievementsReveal result callback

§ achievementsUnlock() [1/2]

static void com.hive.AuthV4.Helper.achievementsUnlock ( String  achievementId)
static

Unlock achievement.

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

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.

Parameters
achievementIdachievements's key value

§ achievementsUnlock() [2/2]

static void com.hive.AuthV4.Helper.achievementsUnlock ( String  achievementId,
final AuthV4.Helper.AuthV4HelperListener  listener 
)
static

Unlock achievement.

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

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.

    Key result code

ErrorCode Code Description Solution
SUCCESS Success Succeeded to request achievementsUnlock
-
RESPONSE_FAIL AuthV4GoogleResponseFailAchievementsUnlock Failed to request achievementsUnlock -
Parameters
achievementIdachievements's key value
listenerAuthV4Helper achievementsUnlock result callback

§ connect()

static void com.hive.AuthV4.Helper.connect ( AuthV4.ProviderType  providerType,
final AuthV4.Helper.AuthV4HelperListener  listener 
)
static

Provider Connection

Condition of use

  1. Compelte to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

ErrorCode Code Description Solution
SUCCESS Success Succeeded to connect with Provider
-
NEED_INITIALIZED AuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
CONFLICT_PLAYER AuthV4ConflictPlayer the player ID of the Provider to be connected already existed
playerInfo: The information of conflicted account
Follow the resolution in accordance with the type of account conflicts
Parameters
listenerAuthV4HelperListener AuthV4Helper Connect result callback

§ disconnect()

static void com.hive.AuthV4.Helper.disconnect ( AuthV4.ProviderType  providerType,
final AuthV4.Helper.AuthV4HelperListener  listener 
)
static

Connects Provider

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

ErrorCode Code Description Solution
SUCCESS Success Completed to disconnect with Provider
-
NEED_INITIALIZED AuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
INVALID_PARAM AuthV4ProviderAlreadtDisconnected The Provider requested to disconnect was not connected with the account -
Parameters
listenerAuthV4HelperListener AuthV4Helper Disconnect result callback

§ getIDPList()

static ArrayList<AuthV4.ProviderType> com.hive.AuthV4.Helper.getIDPList ( )
static

Receives the Provider lists sent by SDK.



§ leaderboardsSubmitScore() [1/2]

static void com.hive.AuthV4.Helper.leaderboardsSubmitScore ( String  leaderboardId,
long  score 
)
static

It update the leaderboard score.


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

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.

Parameters
leaderboardIdleaderboard's key value
scoreLeaderboard score

§ leaderboardsSubmitScore() [2/2]

static void com.hive.AuthV4.Helper.leaderboardsSubmitScore ( String  leaderboardId,
long  score,
final AuthV4.Helper.AuthV4HelperListener  listener 
)
static

It update the leaderboard score.


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

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.

    Key result code

ErrorCode Code Description Solution
SUCCESS Success Succeeded to request LeaderboardsSubmitScore
-
RESPONSE_FAIL AuthV4GoogleResponseFailLeaderboardsSubmitScore Failed to request LeaderboardsSubmitScore -
Parameters
leaderboardIdleaderboard's key value
scoreLeaderboard score
listenerAuthV4Helper LeaderboardsSubmitScore result callback

§ resolveConflict()

static void com.hive.AuthV4.Helper.resolveConflict ( final AuthV4.Helper.AuthV4HelperListener  listener)
static

In case it is not changed the currently signed-in account after accounts conflict.


Key result code

ErrorCode Code Description
CANCELED AuthV4PlayerResolved Not changed the currently signed-in account after accounts conflict
Parameters
listenerAuthV4HelperListener AuthV4Helper Resolve Conflict result callback

§ showAchievements()

static void com.hive.AuthV4.Helper.showAchievements ( final AuthV4.Helper.AuthV4HelperListener  listener)
static

Queries Acheivements

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Reference

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.



Key result code

ErrorCode Code Description Solution
SUCCESS Success Succeeded to request Acheivement
-
NEED_INITIALIZED AuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
CONFLICT_PLAYER AuthV4ConflictPlayer The account signed in on user device is mismatched with the PGS/Game Center account on the game
or the player ID of the Provider to be connected already existed
Follow the resolution in accordance with the type of account conflicts
Parameters
listenerAuthV4HelperListener AuthV4Helper Show achievements result callback

§ showConflict() [1/2]

static void com.hive.AuthV4.Helper.showConflict ( final AuthV4.Helper.AuthV4HelperListener  listener)
static

Displays conflict status, and HIVE UI avilable to select an account.


Key result code

ErrorCode Code Description
PLAYER_CHANGE AuthV4PlayerChange Succeeded to change the player after accounts conflict
INVALID_PARAM AuthV4InvalidConflictInfo Requested to resolve account conflicts not happened
Parameters
listenerAuthV4HelperListener AuthV4Helper Show Conflict result callback

§ showConflict() [2/2]

static void com.hive.AuthV4.Helper.showConflict ( ConflictSingleViewInfo  conflictData,
final AuthV4.Helper.AuthV4HelperListener  listener 
)
static

Displays conflict status, and HIVE UI which is available to select an account as well as shows game information.


Key result code

ErrorCode Code Description
PLAYER_CHANGE AuthV4PlayerChange Succeeded to change the player after accounts conflict
INVALID_PARAM AuthV4InvalidConflictInfo Requested to resolve account conflicts not happened
Parameters
conflictDataHIVEConflictSingleViewInfo Game information of the account-conflicted player
listenerAuthV4HelperListener AuthV4Helper Show Conflict result callback
See also
ConflictSingleViewInfo

§ showLeaderboard()

static void com.hive.AuthV4.Helper.showLeaderboard ( final AuthV4.Helper.AuthV4HelperListener  listener)
static

Queries leaderboard

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Refernce

  1. It tries to execute the service automatically if the signed-in account is diconnected with PGS/GameCenter.



Key result code

ErrorCode Code Description Solution
SUCCESS Success Succeeded to request leaderboards
-
NEED_INITIALIZED AuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
CONFLICT_PLAYER AuthV4ConflictPlayer The account signed in on user device is mismatched with the PGS/Game Center account on the game
or the player ID of the Provider to be connected already existed
Follow the resolution in accordance with the type of account conflicts
Parameters
listenerAuthV4HelperListener AuthV4Helper Show leaderboard result callback

§ signIn()

static void com.hive.AuthV4.Helper.signIn ( final AuthV4.Helper.AuthV4HelperListener  listener)
static

Player sign-in

Condition of use

  1. Complete to initialize HIVE SDK

    Key result code

ErrorCode Code Description Solution
SUCCESS Success Succeeded to sign in
playerInfo: The information of signed-in player
-
NEED_INITIALIZED AuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
IN_PROGRESS AuthV4InProgressSignIn
Requested to process SignIn while sign-in is in progress Wait for the SignIn request in progress
CONFLICT_PLAYER AuthV4ConflictPlayer The account signed in on user device is mismatched with the PGS/Game Center account on the game
or the player ID of the Provider to be connected already existed
playerInfo: The information of conflicted account
Follow the resolution in accordance with the type of account conflicts
INVALID_SESSION AuthV4HelperImplifiedLoginFail Required Explicit Login due to failure of Implicit Login Query the supported Provider lists by calling AuthV4.Helper.getIDPList() and implement Explicit Login UI,
or implement Explicit Login by calling AuthV4.showSignIn() of HIVE UI
Parameters
listenerAuthV4HelperListener AuthV4Helper Sign In result callback

§ signOut()

static void com.hive.AuthV4.Helper.signOut ( final AuthV4.Helper.AuthV4HelperListener  listener)
static

Player sign-out

Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

ErrorCode Code Description Solution
SUCCESS Success Succeeded to sign out
-
NEED_INITIALIZED AuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
Parameters
listenerAuthV4HelperListener AuthV4Helper Sign Out result callback

§ switchAccount()

static void com.hive.AuthV4.Helper.switchAccount ( final AuthV4.Helper.AuthV4HelperListener  listener)
static

If accounts conflict, sign out the current player
and try to sign in with the account signed in on the user device.


Key result code

ErrorCode Code Description
PLAYER_CHANGE AuthV4PlayerChange Succeeded to change the player after accounts conflict
Parameters
listenerAuthV4HelperListener AuthV4Helper Switch Account result callback

§ syncAccount()

static void com.hive.AuthV4.Helper.syncAccount ( ProviderType  providerType,
AuthV4HelperListener  listener 
)
static

Helps to inform whether accounts conflict or not when executing the provided as well as other APIs.


Condition of use

  1. Complete to initialize HIVE SDK
  2. Complete HIVE SignIn

    Key result code

ErrorCode Code Description Solution
SUCCESS Success Account normal state -
NEED_INITIALIZED AuthV4NotInitialized HIVE SDK not initialized Initialize HIVE SDK by implementing AuthV4.setup() API
CONFLICT_PLAYER AuthV4ConflictPlayer Mismatched the signed-in account with PGS/GameCenter account on the device Follow the resolution in accordance with the type of account conflicts
NOT_SUPPORTED AuthV4NotSupportedProviderType Queried account state with other provider types except PGS/GameCenter -
Parameters
providerTypeProviderType to request syncronization
listenerAuthV4HelperListener AuthV4Helper Sync Account result callback
Copyright © GAMEVIL COM2US PLATFORM Inc. All Right Reserved. Terms of Use Privacy Policy