Android:购买的应用程序的订单ID [英] Android: Order ID of the purchased app

查看:138
本文介绍了Android:购买的应用程序的订单ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们计划从应用程序购买中将付费应用程序移至免费应用程序。我们需要为支付应用程序付费的任何用户免费获得应用内购买。



我正在考虑以下解决方案。我们将在我们的服务器中存储用户的唯一ID(或唯一的订单ID)。当我们发布一个新的免费版本的应用程序时,我们可以检查我们的服务器上唯一的用户ID(或订单ID)。如果有匹配,我们就免费提供应用内购买。



现在的问题是:


  • 如果我们收到用户的电子邮件,那就太敏感了,用户可能不愿意给它。

  • 我们能否获得订单应用程序的ID,并根据我们的Google
    播放订单ID列表来检查它?

  • 我们可以用来验证它们的任何其他唯一ID b已经购买了应用程序?


解决方案

获取电子邮件地址需要您修改现有的付费应用。此外,它不建议以上方法(+用户在同一电话中有多个帐户,并不记得使用哪个电子邮件将产生更多问题)



我会推荐要使用 https://developer.android.com/guide/ themes / manifest / manifest-element.html#uid



android:sharedUserId


将与其他
应用程序共享的Linux用户标识的名称。默认情况下,Android为每个应用程序分配自己的
唯一用户ID。但是,如果此属性设置为两个或更多应用程序的相同值
,则它们将共享相同的ID -
,前提是它们也由相同的证书签名。
具有相同用户标识的应用程序可以访问彼此的数据,如果需要
,则运行在相同的进程中。

通过付费应用程序和应用程序内购买的新免费应用程序定义相同的用户ID。付费应用程序中的某些数据可用于识别用户,而无需询问用户的任何更多输入。



请查看用户caw <提供其他媒体资源(图形/声音)作为Google Play应用内收费项目


We are planning to move from a paid app to a free one with in app purchase. We need to give any user, who paid for the app, get the in app purchase for free.

I am thinking of the following solution. We will store user's unique ID (or unique Order ID) inside our servers. When we release a new, free version of the app, we can check the unique user ID (or Order ID) against our server. If there is a match, we give them the in app purchase for free.

The question is:

  • If we get the user's email, that would be too sensitive, and user may not be willing to give it.
  • Can we get the order ID of the app, and check it against our Google Play list of order IDs?
  • Any other unique IDs of the user that we can use to verify that they have bought the app before?

解决方案

Getting email address will need you to modify your existing Paid app. Also it's not recommended for above approach ( + cases where users have multiple accounts in same phone and doesn't remember which email is used will create more issues)

I would recommend to use https://developer.android.com/guide/topics/manifest/manifest-element.html#uid

android:sharedUserId

The name of a Linux user ID that will be shared with other applications. By default, Android assigns each application its own unique user ID. However, if this attribute is set to the same value for two or more applications, they will all share the same ID — provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process.

Define same userId across paid app and new FREE app with in-app purchases. Certain data within paid app can be used to identify the user without asking any more input from users.

Take a look at one of solution provided in this answer by user caw Offering additional media resources (graphics/sounds) as Google Play in-app billed items

这篇关于Android:购买的应用程序的订单ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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