2

For example, I have Artist Name and Song Name in my application and I want to be able to navigate the user to Play Store app to this certain song, where he can buy it. Shazam and SoundHound have this functionality and I would like to know how they achieve that.

I know that you can build search query like this: market://search?q=

But this is not navigating me to the certain song page, even if I will type artist name + song name in the query. Is it even possible to achieve this functionality?

Matthieu Brucher
  • 21,634
  • 7
  • 38
  • 62

1 Answers1

0

If you do know specific item that needs to be purchased, than you can use this:

market://details?id=123456

Otherwise you are stuck with

market://details?q=...
Renats Stozkovs
  • 2,549
  • 10
  • 22
  • 26
  • I know what item I want to purchase only by its name, I don't know any IDs and wondering how to get them – Sergey Bakaenko Feb 17 '17 at 08:16
  • @SergeyBakaenko So how would you know which ID to use? If you perform a search for any keyword, Play Store returns dozens of results, even though only one might be an exact match. You can try to search in background (Through HttpClient for example) and get the first item in a list, but that is not how it is supposed to work really – Renats Stozkovs Feb 17 '17 at 15:46
  • Is there some Web API for play market where I can build this requests? – Sergey Bakaenko Feb 20 '17 at 17:30