question

temah-4opt avatar image
temah-4opt asked

How get username(alias) or playerID in leaderboard ?

Hello! How I can get username in GameCircle for later use in the application? Or how I can read all information in Local Plaer Profile? Thanks!)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sachin@Amazon avatar image
Sachin@Amazon answered
For a first generation Kindle Fire: Open any Gamecircle enabled game ( http://amazon.com/gamecircle-games ) and tap the "settings' link on the "Welcome Back" message. (Alternatively, open any Leaderboards or Achievements and tap the Settings tab). A username will be created for the customer and they will have the ability to rename it. For all other Kindle Fire devices: Navigate to the 'Games' tab from the devices Home screen. Select "Profile" from the softkey menu button, then select 'Edit'. However if you do not have a GameCircle enabled game then you will be sent directly to the Appstore. If this is the case, please install a game from http://amazon.com/gamecircle-games.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

temah-4opt avatar image
temah-4opt answered
Thanks. Maybe I'm not correctly put. I mean - how can I get all the information about the profile of the script?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dixith@Amazon avatar image
Dixith@Amazon answered
Hi, We have forward your request to concerned team and will get back to you once we have an update.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dominic avatar image
Dominic answered
I'd also be interested in a way of retrieving the game circle player id. Is it possible?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sachin@Amazon avatar image
Sachin@Amazon answered
Hi, sorry for delay in getting back to you. The Player Nickname can be accessed through the com.amazon.ags.api.profiles.ProfilesClient.getLocalPlayerProfile() method or through its corresponding static convenience method, com.amazon.ags.api.profiles.AGProfiles.getLocalPlayerProfile() method. The response is asynchronous, so the game developer has to either implement a AGResponseCallback or pull the returned AGResponseHandle. The Player object currently only exposes a getAlias() method which is the player’s Nickname.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jleehurt avatar image
jleehurt answered
agsGameClient.getProfilesClient().getLocalPlayerProfile(new AGResponseCallback () { @Override public void onComplete(RequestPlayerProfileResponse requestPlayerProfileResponse) { String alias = requestPlayerProfileResponse.getPlayer().getAlias(); //do something with the alias } });
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

xologuapo avatar image
xologuapo answered
I tried this code but it didn't worked. The onComplete method never was called. This is what log has given me: 05-17 11:42:22.444: D/GC_BaseReplyMessengerFactory(5431): Constructing a ServiceHandleHandler for the outgoing asynchronous event 05-17 11:42:22.452: D/PROFILES_ProfilesReplyMessengerFactory(5431): Processing incoming service response message of type: 18 and responseCode: 17 05-17 11:42:22.452: D/GC_BaseReplyMessengerFactory(5431): Setting handle data with response: ResponseCode: 17 05-17 11:42:22.452: D/GC_BaseReplyMessengerFactory(5431): ErrorCode: NONE 05-17 11:42:22.452: D/GC_BaseReplyMessengerFactory(5431): requestType: 18 I still don't see what is wrong. Maybe a permission is missing in the manifest.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Blackhouses, Thank you for your post. This is an app specific issue and we need to see the code you are using to get the player profile. Please visit the ContactUs form https://developer.amazon.com/help/contactus.html , and in the body of the message, include the the link to this thread ( https://forums.developer.amazon.com/forums/thread.jspa?threadID=517) and indicate that you've been asked to provide the sample code related to this issue. We will respond to that case.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

alexandertn avatar image
alexandertn answered
Hi friends, I called that method in onCreate() in MainActivity of my project. The code is like below: @Override protected void onCreate(Bundle icicle) { ....... Some code EnumSet myGameFeatures = EnumSet.of(AmazonGamesFeature.Achievements, AmazonGamesFeature.Leaderboards); AmazonGamesClient.initialize(getApplication(),new AmazonGamesCallback() { @Override public void onServiceReady() { LOG("DEBUG", "Begin to get local profile Request local player profile !"); AmazonGames agsClient = AmazonGamesClient.getInstance(); agsClient.getProfilesClient().getLocalPlayerProfile(new AGResponseCallback () { @Override public void onComplete(RequestPlayerProfileResponse requestPlayerProfileResponse) { Log.i("DEBUG", "onComplete Request local player profile !"); String alias = requestPlayerProfileResponse.getPlayer().getAlias(); Log.i("DEBUG", "alias amazon game circle :: " + alias); } }); .... some other override function }, myGameFeatures); After adding the code, the result that I get is: I/DEBUG( 9791): begin to get local profile Request local player profile ! D/PROFILES_ProfilesServiceProxy( 8216): Request Local Player Profile called Asynchronously with handle. Waited for a while I noticed that I cannot reach function onComplete() , so I cannot get the alias (player name) string. Do you have any suggestion about it? Thank you!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Alexandertn, We have received your ContactUs. We have forwarded your issue to the concern team. I will reply back once I get update from them. Thank you for your patience.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.