I have a web browser app, some sites will redirect to their own custom scheme, like customscheme://.....
. On Chrome it will open the Play Store straight into their app listing or the actual app if the app is installed. When I try to create an Intent
for customscheme://.....
I just get an ActivityNotFoundException
, so I'm guessing I need to open the Play Store and pass it the custom scheme. But how do I do that? I only know how to open the Play Store and pass it a package, but I have no idea what the package is for that custom scheme.
Thanks.
Edit: Just to clarify my question, how can I tell the Play Store to show the store listing for a given custom url scheme without me knowing the package name?
Edit: Wanted to explain a bit further based on comments and one answer. First, like I said, I know how to open the Play Store passing the package, so that isn't the issue. I need to somehow do that using a custom url scheme, not a package name.
To understand what I want to do, open Chrome or Firefox and go to reddit.com and then reddit will ask you to open their app at the bottom. If you press open app, it will open the reddit app if it is available (I know how to do that) but if not, it will open the Play Store (I don't know how to do that).
Edit: Looks like most websites are also opening market://
and that is what those browsers are using, not the customscheme://
.