Thanks ianhanniballake for your help, I'm adding this to clarify the answer (e.g. achievements could be auto-posted) and to summarize what we've learned adding this feature.
Hopefully a Googler will look at our Pro/Con because with the 1.0 SDK it's hard to recommend the API, but with improvements it would be valuable.
Automatic sharing of google play services achievement (as of 7/13 SDK):
- Achievement progress (e.g. unlock) is not shared/visible through g+
- The sdk does not facilitate sharing achievements. Something like PlusShare.Builder.shareUnlock() would help if automatic sharing is not added, but currently to share achievements on g+ you must implement from scratch
- imo nothing prevents Google adding automatic achievement sharing in the future. Their sign in flow gets user permission to share "game progress", and other posts say leaderboards do have social sharing
From our experience: Pro/Con of Achievements with Google Play services:
Pro:
- It's Google's official solution so hopefully will be defacto Android standard
- Google could make achievement progress shared/visible through g+ if they want. That would make it much more valuable
Con:
- User must be willing to sign into g+ to view/save achievements. Some users will not do this and be annoyed they cannot use achievements
- Synchronizing client-server has complex policy and implementation issues. E.g. the user may sign in after substantial game progress; may simultaneously play on multiple devices; may sign out and sign in as a different user mid-game
- Testing is difficult because there's no way to reset achievement progress for test accounts through Android API or server UI. I assume google can fix this... please! Some posts say remove/re-add a tester account resets but that did not work for us, or perhaps it only works pre-Publishing
- Google's design intends that their server manages UI assets (icons, strings) and achievement policy. This is good if achievements will be visible in g+ in the future, but until then it's a hassle. E.g. see code below
- Client UI is ok but not polished. E.g. description text area is limited, "Defeat a Skeleton King in battle" is truncated in some UI modes and there's no way to see the full detail. Incremental achievements are limited to 10,000 steps (why?)
Recommendation: If you believe Google will make achievements visible through g+, that's a great feature and explains most of the "Con" above. However if achievements remain unshared then using google's API was less reliable and substantially more work than it would be to roll our own client implementation.
WARNING: Google Play game services as of 7/15/13 appears to have an intermittent crashing bug if you use ImageManager. See ClassCastException: com.google.android.gms.common.images.e We have switched to bundling the unlock images in the APK and no longer use ImageManager
This was our now-deprecated code to retrieve a bitmap when a user unlocks an achievement:
Uri unlockedUri = achievement.getUnlockedImageUri();
if (unlockedUri != null) {
ImageManager im = ImageManager.create(context);
// Warning -- loadImage may silently skip call back if called too soon after achievement load
im.loadImage(new ImageManager.OnImageLoadedListener() {
@Override public void onImageLoaded(Uri arg0, Drawable drawable) {
// Attempt to convert the Drawable to a sharable image; if it fails we'll post text only
Bitmap bitmap = null;
if (drawable instanceof BitmapDrawable) {
bitmap = ((BitmapDrawable) drawable).getBitmap();
} else {
log.warn("not BitmapDrawable ", drawable);
}
listener.onBitmapLoaded(bitmap);
}
}, unlockedUri);
} else {
log.debug("no unlockedImageUri");
listener.onBitmapLoaded(null);
}
One upside of google not providing automatic g+ sharing is that when you have to roll your own sharing anyway, you may as well do it for other services in addition to g+. E.g. we offer sharing unlocked achievemets to twitter as well. But perversely this is a good reason why Google should make achievements social on g+ asap... developers are lazy and that would ensure lots of games where social achievements were on g+ first ;-)