在 Android 游戏中,您能否让玩家在另一个游戏中解锁某些东西(或查看另一个游戏的高分)?

In an Android game, can you enable the player to unlock something in ANOTHER game (or see another game's high score)?

这两个想法的应用可能包括让玩家能够在最新的 sequel 中看到他或她在早期游戏中的进度,能够在游戏中保持相同 character/progress 等等。 .

虽然最好的解决方案可能是让玩家创建一个他们在游戏中使用的帐户,但我想尽可能避免这样做(既因为玩家已经登录 Google Play Games,又因为我目前无法访问服务器基础设施来处理这件事)。是否有任何其他 official/popular 机制可以在游戏之间传递数据,或者帐户路由是最好的选择吗?

我相信这就是您要找的东西,Interacting with Other Apps especially the Sharing Simple Data and Sharing File section. You may also refer to this documentation for Receiving Simple Data from Other Apps 这表明您将需要一个 ACTION_SEND 意图过滤器。

Update Your Manifest

Intent filters inform the system what intents an application component is willing to accept. Similar to how you constructed an intent with action ACTION_SEND in the Sending Simple Data to Other Apps lesson, you create intent filters in order to be able to receive intents with this action. You define an intent filter in your manifest, using the <intent-filter> element.

Handle the Incoming Content

To handle the content delivered by an Intent, start by calling getIntent() to get Intent object. Once you have the object, you can examine its contents to determine what to do next. Keep in mind that if this activity can be started from other parts of the system, such as the launcher, then you will need to take this into consideration when examining the intent.

我认为这是开始了解如何将数据从一个应用程序传递到另一个应用程序的好地方。您还需要在现有应用和新应用中对当前实施进行更改,才能实现这一点。

另一种解决方案是让所有游戏共享一个通用的 Play 游戏机配置。您可以让多个 packageId 指向同一个 appId,这样它们就能看到相同的成就列表、排行榜等。

根据您的具体要求,您可以简单地更改项目的描述以描述它们适用于哪个游戏,或者实现自定义 UI 来显示列表。