在另一个应用程序恢复应用内购买的交易 [英] Restore transactions of in-app purchases in another app

查看:219
本文介绍了在另一个应用程序恢复应用内购买的交易的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用应用内计费V3 IabHelper 由谷歌提供的类。利用其 queryInventoryAsync 方法,可以很容易地恢复我的应用程序的用户的交易。现在到了棘手的部分!我需要恢复的其他的矿山应用的交易。可以在做些什么呢?

Using In-App Billing v3 and the IabHelper class provided by Google. Using its queryInventoryAsync method, it's easy to restore the user's transactions of my app. Now comes the tricky part! I need to restore transactions of another app of mine. Can that be done?


  • 这两个应用程序已经签署使用相同的密钥。

  • 这两个应用程序在同一个开发者账户下发布。

  • 这两个应用程序碰巧具有相同的 sharedUserId (我希望能保持这种方式)。

  • Both apps have been signed with the same key.
  • Both apps are published under the same developer account.
  • Both apps happen to have the same sharedUserId (and I hope to keep it that way).

我知道使用 sharedUserId 可引起的问题 IAB V3 但对于这个特殊的任务,我相信它应该有可能得到它的工作。任何帮助是极大AP preciated!

I know the use of sharedUserId can cause problems with IAB v3 but for this particular task I believe it should be possible to get it working. Any help is greatly appreciated!

此功能的动机很简单。在所做的任何应用程序内购买我的基本的应用程序应该在提供我的的应用程序,而不强制用户重新购买等值的物品。

The motivation for this feature is simple. Any in-app purchases made in my Basic app should be made available in my Pro app, without forcing the user to buy the equivalent items anew.

推荐答案

这不能做。
iABHelper提供基于你的包名ID它就会自动从您的应用程序传递的信息。
由于您的其它应用有不同的包名购买者不打算在此返回。
所有你能做的就是从一个应用程序发送广播到另一个程序,在其他应用程序请求并将该信息发送回第一个应用程序。

This cannot be done. iABHelper provides information based on your package name id which gets automatically passed from your app. Since your other application has different package name those purchases are not going to return at all. All you can do is to send broadcast from one app to another and process that request in other application and send that information back in first app.

这篇关于在另一个应用程序恢复应用内购买的交易的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆