如何获取已购买的应用列表,包括价格? [英] How to get purchased apps list, including the prices?

查看:23
本文介绍了如何获取已购买的应用列表,包括价格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小应用程序(这里) 用于显示应用列表.

I have a small app (here) for showing a list of apps.

最近,我被告知有一个应用程序(此处)显示已购买应用的列表,包括其价格.

Recently, I was informed that there is an app (here) that shows a list of purchased apps, including their prices.

我已经对其进行了测试,它确实显示了所有购买的应用程序,就像在 Google Play 网站上一样 (这里)

I've tested it, and it indeed shows all of the purchased apps, just like on the Google Play website (here)

我什至不知道有可能得到这样的列表,所以在我搜索了互联网之后,我仍然不明白这是如何完成的.

I didn't even know it's possible to get such a list, so after I've searched the Internet, and here, I still don't get how this was done.

我所知道的是,这个应用程序使用用户的一些身份验证,从他的 Google 帐户中获取应用程序列表.

All I know is that this app uses some authentication from the user, to get the list of apps from his Google account.

而且,我发现有一些非官方的库(大多数都非常非常旧)可以从 Play 商店获取应用程序的信息,但似乎没有任何官方的.

And, all I've found is that there are some non-official libraries (most are very very old) to get information of apps from the Play Store, but nothing seems official.

  1. 什么API可以用来获取已购买应用的信息?

  1. What is the API that can be used to get information of purchased apps?

它还能做得更多吗?也许执行搜索?也许显示已安装的免费应用程序?也许是安装和卸载它们的时间?以及这些应用的类别?

Can it do more ? Maybe perform search? Maybe show free apps that were installed? Maybe the time they were installed and uninstalled? And the categories of those apps?

使用此 API 有什么特殊要求吗?

Are there any special requirements for using this API ?

推荐答案

因为这个问题有悬赏,不让我指向重复,所以我就在这里做.

Because this question has a bounty, it doesn't let me point to the duplicate so I'll do it here.

看起来有一个帖子的答案与您在这里所能得到的一样好.

It looks like there's a post that has as good an answer as you could get here.

总而言之,您似乎想向 Google 请求许可(通过 GoogleSignIn).然后从帖子:

The long and short of it seems to be that you'd want to request permission from Google (via GoogleSignIn). Then from the post:

如果可以获得完全访问权限,则可以找到帐户持有人使用的所有应用的列表,并将其与设备上的内容进行比较.

If full access can be gained a list of all apps used by the account holder can be found and compared to what's on the device.

然后答案就涉及到查询包管理器如何让您访问已安装的应用程序:

And then the answer goes onto cover how querying the packagemanager can get you access to the apps installed:

包管理器将检索设备上当前安装的所有应用的列表.PackageInfo 提供有关应用程序的详细信息.INSTALL_REASON_USER 还会过滤掉用户主动安装的应用程序.

Package Manager will retrieve a list of all apps currently installed on the device. PackageInfo provides the details about the app. INSTALL_REASON_USER will also filter out apps that have been actively installed by the user.

您可能需要查看 com.google.firebase.appindexing 和记录用户操作.可以跟踪不同的操作.

You might want to look at com.google.firebase.appindexing and Log User Actions. Different actions can be tracked.

用户帐户历史记录位于 https://myactivity.google.com/myactivity.

The users account history is found at https://myactivity.google.com/myactivity.

一个有用的链接是 OAuth 2.0 Playground.

A helpful link is the OAuth 2.0 Playground.

我强烈建议继续在该线程上进行任何对话,因为它似乎更活跃并且获得更多支持.

I'd highly recommend continuing any conversation on that thread, as it seems to be more active and have more upvotes.

这篇关于如何获取已购买的应用列表,包括价格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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