Gamebase SDK for Android
2.39.0
NHN Cloud Gamebase Platform
|
This class provides functionality related to terms of use view. More...
Static Public Member Functions | |
static void | showTermsView (@NonNull Activity activity, @Nullable GamebaseDataCallback< GamebaseDataContainer > callback) |
Show terms and conditions web view. More... | |
static void | showTermsView (@NonNull Activity activity, @Nullable GamebaseTermsConfiguration configuration, @Nullable GamebaseDataCallback< GamebaseDataContainer > callback) |
Show terms and conditions web view. More... | |
static void | queryTerms (@NonNull Activity activity, @NonNull GamebaseDataCallback< GamebaseQueryTermsResult > callback) |
Request terms and conditions items list from Gamebase console. More... | |
static void | updateTerms (@NonNull Activity activity, @NonNull GamebaseUpdateTermsConfiguration configuration, @Nullable GamebaseCallback callback) |
Send the agreement to the terms and conditions to the Gamebase server. More... | |
static boolean | isShowingTermsView () |
This is the method to check if terms view is being shown. More... | |
This class provides functionality related to terms of use view.
|
static |
This is the method to check if terms view is being shown.
|
static |
Request terms and conditions items list from Gamebase console.
This API can be used when you create custom terms and conditions agreement UI. If you call after logging in, you can also check whether the user agrees to the terms and conditions, except whether to receive notification.
activity | Current activity. |
callback | Information on terms and conditions registered in the console. After logging in, whether you agree to the terms and conditions is returned, except whether to receive notification. |
Example Usage:
|
static |
Show terms and conditions web view.
activity | Current activity. |
callback | called when the browser closed. |
Example Usage:
|
static |
Show terms and conditions web view.
activity | Current activity. |
configuration | The initial settings of terms view. |
callback | called when the browser closed. |
Example Usage:
|
static |
Send the agreement to the terms and conditions to the Gamebase server.
This can also be used to change the content of the optional terms and conditions.
activity | Current activity. |
configuration | |
callback | Example Usage: Gamebase.Terms.queryTerms(activity, new GamebaseDataCallback<GamebaseQueryTermsResult>() {
@Override
public void onCallback(GamebaseQueryTermsResult result, GamebaseException queryTermsException) {
if (Gamebase.isSuccess(queryTermsException)) {
// Succeeded to query terms.
final int termsSeq = result.getTermsSeq();
final String termsVersion = result.getTermsVersion();
final List<GamebaseTermsContent> contents = new ArrayList<>();
for (GamebaseTermsContentDetail detail : result.getContents()) {
GamebaseTermsContent content = GamebaseTermsContent.from(detail);
// Change agree value what you want!
content.setAgreed(agreeOrNot);
contents.add(content);
}
final GamebaseUpdateTermsConfiguration configuration =
GamebaseUpdateTermsConfiguration.newBuilder(termsSeq, termsVersion, contents)
.build();
Gamebase.Terms.updateTerms(activity, configuration, new GamebaseCallback() {
@Override
public void onCallback(GamebaseException updateTermsException) {
if (Gamebase.isSuccess(updateTermsException)) {
// Succeeded to update terms.
} else {
// Failed to update terms.
}
}
});
} else {
// Failed to query terms.
}
}
});
|