question

skyzoneentertainment avatar image
skyzoneentertainment asked

Is that possible to update progress of multiple Achievement at a time?

Hi, Our game has more than 5 accumulated 'SCORE' achievement below, 1. Score 50,000 2. Score 100,000 3. Score 200,000 4. Score 500,000 5. Score 1,000,000 As soon as game finish, I want to update all score progress to the Achievement with updateProgress() if it's possible. EX) If you got 50,000 score, you will get below, 1. Score 50,000 (unlocked) 2. Score 100,000 (50%) 3. Score 200,000 (25%) ....etc 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.

1 Answer

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Skyzoneentertainment, You can certainly achieve it by using our GameCircle achievement client. The code should look like below : AchievementsClient acClient = agsClient.getAchievementsClient(); String[] achievementIds = {"ACHIEVEMENT_ID_1", "ACHIEVEMENT_ID_2", "ACHIEVEMENT_ID_3", "ACHIEVEMENT_ID_4", "ACHIEVEMENT_ID_5"}; for(final String achievementId : achievementIds){ AGResponseHandle handle = acClient.updateProgress(achievementId, 25.0f); handle.setCallback(new AGResponseCallback() { @Override public void onComplete(UpdateProgressResponse result) { if (result.isError()) { // Add optional error handling here. Not strictly required // since retries and on-device request caching are automatic. } else { if(achievementId.equals("ACHIEVEMENT_ID_1")){ //Update UI for ACHIEVEMENT_ID_1 } else if(achievementId.equals("ACHIEVEMENT_ID_2")){ //Update UI for ACHIEVEMENT_ID_2 } } } }); } Have you already tried to do so? Did you face any problem there?
10 |5000

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