question

Paul Choi avatar image
Paul Choi asked

How to obtain current user's progress in achievement?

The updateProgress method (if I understand what it does correctly), simply sets the progress to a certain level. How do we access user data regarding the user's current progress in the particular achievement, so that we could increment it? For example, if I had wanted to make an achievement for the 10th game the user played... AGResponseHandle handle = acClient.updateProgress("tenthGame", 10.0f); would simply set the value of that achievement to 10 every time rather than incrementing it. How could I access the current level and increment it??
10 |5000 characters needed characters left characters exceeded

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

1 Answer

Paul Choi avatar image
Paul Choi answered
Never mind... I got it. For those who are interested... AGResponseHandle handle = acClient.getAchievement("tenthGame"); handle.setCallback(new AGResponseCallback () { @Override public void onComplete(GetAchievementResponse result) { acClient.updateProgress("tenthGame", result.getAchievement().getProgress() + 10.0f); } });
10 |5000 characters needed characters left characters exceeded

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