Skip to content

SohaSDK

Overview

SohaSDK is the main class of the SohaGame SDK, and encapsulates most of the methods To import SohaSDK:

import com.soha.sdk.SohaSDK;

Public Method

Initializes the SDK and starts the setup process.

public void init(final Activity activity, LogoutCallback logoutCallback)


Starts the process of paying for a product.

public void payProduct(final Activity activity, final String orderInfo, final OnPayListener onPayListener)


Starts the process of paying for a product with ext param

public void payProduct(final Activity activity, final String orderInfo, final OnPayListener onPayListener, String ext)


Open the payment form of SohaSDK

public void pay(Activity activity, PaymentCallback callback)


Retrieves a list of products

public void getListProduct(final PaymentNewCallBack paymentCallback)


Displays the dashboard UI

public void showDashboard(Activity activity)


Initiates the login process

public void login(final Activity activity, LoginCallback loginCallback)


Send the set_role event for tracking character information and game server

public void mapUserGame(final Activity activity, final String areaId, final String roleId, final String roleName,
final String roleLevel)


Logs create_character of a character in the game

public void logCreateCharacter(final Activity activity, final String areaId, final String roleId, final String roleName,
final String roleLevel)


Initiates the logout process

public void logout(final Activity activity)


Sets the language of the SDK

public void setLanguage(Context context, SohaLanguage sohaLanguage)


Open the Store to review the app

public void openStore() 


Initiates the process of deleting the user's account

public void deleteAccount(Activity activity, DeleteAccountCallback deleteAccountCallback)