Request the Google Advertising Identifier (GAID) using the kinds paramenter and receive the result through CloudDevCallback.
If the response is successful, the callback returns a map with the keys that correspond to the requested strings in the kinds parameter.
WarningDo not call UI functions within the callback function as it is called in the IO thread.
public static void request(Context context, List<String> kinds, CloudDevCallback callback)
CloudDevSdk.request(context, Arrays.asList("gaid"), new CloudDevCallback() {
@Override
public void onSuccess(Map<String, String> kinds) {
// This is called in IO thread
log("Google Advertising ID: " + kinds.getOrDefault("gaid", ""));
}
@Override
public void onError(String reason) {
// This is called in IO thread
log("Error: " + reason);
}
});
kinds (string)
Description
gaid
Google Advertising ID of the user's local device.
Determine user account type
Determine if the user has the specified account type on their device (with saved user/game data) that they use to log in to the game.
If the response is successful, the callback returns a map with the keys that correspond to the requested strings in the kinds parameter.
Each set contains a key as one of the kinds parameter and a value to determine if the result is successful or not. When successful, the value is "true". When not successful, the value is "false" .
WarningDo not call UI functions within the callback function as it is called in the IO thread.
public static void send(Context context, Map<String, String> data, CloudDevCallback callback)
Map<String, String> data = new HashMap<String, String>();
data.put("login_account_type", "guest");
CloudDevSdk.send(context, data, new CloudDevCallback() {
@Override
public void onSuccess(Map<String, String> kinds) {
// This is called in IO thread
log("Login Account Type Send Result: " + kinds.getOrDefault("login_account_type", ""));
}
@Override
public void onError(String reason) {
// This is called in IO thread
log("Error: " + reason);
}
});
kinds (string)
Value (string)
Description
login_account_type
guest
samsung
The type of account used by the user to log in to the game.
Manage Your Cookies
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.