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

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

问题描述

背景



我有一个小应用程序( here )以显示应用列表。



最近,我被告知有一个应用程序( here ),显示已购买应用程序的列表,包括它们的价格。



我测试过了,它确实显示了所有购买的应用,就像在Google Play网站上一样( here



问题和我找到的



我甚至不知道有可能获得这样一个列表,所以在我搜索了互联网之后,我仍然不知道这是如何完成的。

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



而且,我发现所有的非官方图书馆(大部分都非常老)从Play商店获取应用程序的信息,但似乎没有任何官方的消息。



问题


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

  2. 它可以做更多吗?也许执行搜索?也许显示已安装的免费应用程序?也许他们安装和卸载的时间?这些应用程序的类别?

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

  4. 指向重复,所以我会在这里做。



    看起来有一篇文章有​​一个很好的答案,你可以得到这里



    好像是你想要请求Google的许可(通过GoogleSignIn)。然后从帖子中:


    如果可以获得完全访问权限,则可以找到账户持有人使用的所有应用程序列表并将其与在设备上。


    然后回答覆盖了如何查询packagemanager可以访问安装的应用程序:


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



    您可能需要查看com.google.firebase.appindexing和Log User动作。可以跟踪不同的操作。



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



    有用的链接是OAuth 2.0 Playground。


    我强烈建议继续在该主题上进行任何对话,因为它似乎更加活跃并且有更多upvotes。


    Background

    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.

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

    The problem and what I've found

    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.

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

    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.

    The questions

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

    2. 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?

    3. 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.

    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:

    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.

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

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

    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天全站免登陆