我正在使用谷歌播放服务,在我的android游戏中取得成就(它实际上是统一的,但并不重要)。
To unlock achievement I use plugin which calls unlock(GoogleApiClient apiClient, String id) https://developer.android.com/reference/com/google/android/gms/games/achievement/Achievements.html#unlockImmediate%28com.google.android.gms.common.api.GoogleApiClient,%20java.lang.String%29 method. When achievements are set as completed, google shows its own notification, like this:
.
我需要默默地解锁成就,而不显示此通知。难道有什么可隐瞒的吗?
对于其他想要答案的人:
当你建立你的GoogleApiClient
using new GoogleApiClient.Builder(this)
您正在为游戏服务提供一项可以显示通知的活动。如果您将传递到构建器的上下文更改为应用程序上下文而不是活动,则您不应收到任何通知。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)