3

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 ?

android developer
  • 114,585
  • 152
  • 739
  • 1,270

3 Answers3

4

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.

Kyle Venn
  • 4,597
  • 27
  • 41
  • Both this answer and the link still don't show how to do it. Only clues. About PackageManager , I'm aware of this, but this will show only apps that were marked as being installed from the Play Store. Nothing more. I want to see how to get all of the information: what was purchased, the price, the time, etc... Just like on the app I've pointed to. – android developer Apr 10 '18 at 17:56
  • 2
    I agree the answer on that post doesn't tell you exactly how to do it and it also hasn't been accepted. I'd say if you have something to add to the original question, modify the post I linked and put a bounty on that one. Just for the sake of keeping everything in one place (so there aren't two questions asking the same thing). I think that's why you're being down-voted, not because the question isn't a good one. – Kyle Venn Apr 10 '18 at 19:50
  • @KyleVenn I don't think I can switch the bounty to another place, and I don't think I will get notifications about answers if I put a bounty on a thread I didn't make. – android developer Apr 11 '18 at 06:44
  • 1
    In any case, if you have a working solution, please post it. It's unfair that you get a bounty for such general information that already exists on another thread that you've pointed to. – android developer Apr 12 '18 at 12:52
  • I don't get a bounty unless you accept - so I wouldn't worry about that (and I don't expect you to). For organizational purposes, I like the idea of having this conversation on one thread which is why I suggested closing this one in favor of the one that was opened first. If everyone's answers are on one thread, it'll be easier to find from search and likely more helpful to someone with the same problem in the future. I only posted an answer at all because StackOverflow wouldn't let me suggest this as a duplicate due to the bounty. It's fine to disagree, that's just my 2c. – Kyle Venn Apr 12 '18 at 14:19
  • This is incorrect. If the bounty date is over, the answer with most upvotes get half of it, starting from certain upvotes count. About being duplicate, I asked for more than list of apps. – android developer Apr 12 '18 at 16:37
  • @androiddeveloper if you think so, then you should flag the answer and state that it does not answer the question and should be left as a comment. You could always bring in a moderator too since you have bounty on it – Haris Nadeem Apr 13 '18 at 04:48
  • Sadly, I have little knowledge on android development and will be of virtually no help. I'm interested in the API as well. Didn't know such a thing existed. – Haris Nadeem Apr 13 '18 at 04:51
  • 1
    And as I wrote, the bounty got auto-granted, even though this answer, same as the others, didn't help at all :( – android developer Apr 14 '18 at 12:18
0

There is no API (official or unofficial) for such queries. As in detail in my answer here, I've explored all the possible legitimate ways to access any possible information like this and there are no legitimate ways.

This blog post Possible Android Permission Security Flaw with Google APIs I wrote for a University capstone subject, is the development of a research proposal of a possible zero day exploit in the API.

It was investigating the answer to this How to get list of paid apps by a user from google play? that led me to believe that there may be some issues with how these applications have managed to gain access to this information.

  • But it seems there is an official API for this. Otherwise, how could the app have done it while using a native login dialog? – android developer Apr 11 '18 at 06:41
  • @androiddeveloper they're gaining access to information they shouldn't have access to. I'm not sure how. If I investigate it further I'll let you know. –  May 03 '18 at 18:16
-1

After searching and reading about this questions, I came up with a solution close to that one that is commonly used to check if your application is updated by comparing the installed version with the version published on Google Play.

I know that there is this list about your apps, when you have access to the account, so, having access to this account, you can create a crawler to check this page and get all purchased apps.

Massita
  • 309
  • 2
  • 10
  • 1
    I don't think the app uses a crawler. It's quite fast, and it shows a native sign in dialog, and not web-based one. – android developer Apr 11 '18 at 06:42
  • Hmm, maybe he is using some hidden internal api, the same that is used by the google play app... i dont know ahahah – Massita Apr 11 '18 at 12:33