Google Play app hyperlinks in AC forums

Mr Mendelli

Well-known member
Dec 19, 2016
451
0
0
Visit site
I want to know if it is possible to post hyperlinks to the Play Store that open the Play Store app, not the users browser in the Android Central forums. I currently use this format:

https://forums.androidcentral.com/e...s/details?id=%25PACKAGENAME%25&token=IXro9hbL

I found a website that gave this example, claiming it could open links in this manner, but it doesn't seem to work. I think it's made to be opened specifically from an android app:

market://details?id=%PACKAGENAME%

Any help is appreciated.
 

B. Diddy

Senior Ambassador
Moderator
Mar 9, 2012
165,594
4,736
113
Visit site
That format opens up the Play Store app on my Nexus 6P, when tapping it in the Android Central app. Have you tried this on multiple phones? Or have you tried going to Settings>Apps, selecting Android Central, and Clearing Defaults (or going to Settings>Apps, tapping Menu, then Reset All App Preferences)? It's possible that on your phone, at some point, you selected the AC app to open a Play Store link, and then tapped Always (instead of Just Once), making that the default.
 

Mr Mendelli

Well-known member
Dec 19, 2016
451
0
0
Visit site
That format opens up the Play Store app on my Nexus 6P, when tapping it in the Android Central app. Have you tried this on multiple phones? Or have you tried going to Settings>Apps, selecting Android Central, and Clearing Defaults (or going to Settings>Apps, tapping Menu, then Reset All App Preferences)? It's possible that on your phone, at some point, you selected the AC app to open a Play Store link, and then tapped Always (instead of Just Once), making that the default.
I don't want the feature for myself, I want it so that other users on AC will be directly directed to the play store app when I post a hyperlink to an app. It's not essential, just easier. I would think the AC app would handle links to apps or links beginning with "market://details?id=" this way by default. To be honest, I think it's silly the forum engine doesn't do this automatically or have a "Play Store link" feature that does this directly from the AC app.
 

B. Diddy

Senior Ambassador
Moderator
Mar 9, 2012
165,594
4,736
113
Visit site
I realize you want it for other users -- but the issue here is how the system behaves when you first tap a link that can be opened up by multiple possible apps. A link like that could be opened up by the Play Store app, Chrome, or the in-app browser. If a default hasn't been set, the user will be asked to choose one of them, and will also be asked if they want to use that choice Just Once or Always. I don't think you can prevent the user from making something besides the Play Store app the default.
 

Mr Mendelli

Well-known member
Dec 19, 2016
451
0
0
Visit site
I realize you want it for other users -- but the issue here is how the system behaves when you first tap a link that can be opened up by multiple possible apps. A link like that could be opened up by the Play Store app, Chrome, or the in-app browser. If a default hasn't been set, the user will be asked to choose one of them, and will also be asked if they want to use that choice Just Once or Always. I don't think you can prevent the user from making something besides the Play Store app the default.
Alright, thank you for your input on the matter.
 

smvim

Well-known member
May 16, 2014
1,080
52
48
Visit site
This is a really interesting topic, thank you for bringing it up. Just want to point out there's more general info available accessing the Play Store web site than there is using the Play Store app. (... with a good argument that the difference can be minimal when using a mobile device browser as opposed to a computer browser with a typically much larger screen.)
 

Mr Mendelli

Well-known member
Dec 19, 2016
451
0
0
Visit site
This is a really interesting topic, thank you for bringing it up. Just want to point out there's more general info available accessing the Play Store web site than there is using the Play Store app. (... with a good argument that the difference can be minimal when using a mobile device browser as opposed to a computer browser with a typically much larger screen.)
Yea, I just think it would make sense and make the AC app much more streamlined.
 
Last edited:

Mr Mendelli

Well-known member
Dec 19, 2016
451
0
0
Visit site
I'm no programmer by any means (as you'll soon see), but I think the feature could be more or less easily implemented in this manner:

getposturl(%MARKETURL%)
>startActivity(com.android.vending)
openmarketurl(%MARKETURL%)

or, something like that...
 
Last edited:

Mr Mendelli

Well-known member
Dec 19, 2016
451
0
0
Visit site
I have noticed in the past when apps either become corrupt, or don't uninstall properly and the activity launcher (i.e. home shortcut) remains, launching some of them redirects me to the apps page on the play store. I snagged this bit of code from an app:

----------------------------------------------------------------------------------------------
.method static a(Landroid/content/Context;)V
.registers 4

:try_start_0
const-string v0, "market://details?id=%PACKAGENAME%"

invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

move-result-object v0

new-instance v1, Landroid/content/Intent;

const-string v2, "android.intent.action.VIEW"

invoke-direct {v1, v2, v0}, Landroid/content/Intent;->(Ljava/lang/String;Landroid/net/Uri;)V

invoke-virtual {p0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
:try_end_10
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_10} :catch_11
----------------------------------------------------------------------------------------------

Maybe in the future, a developer could implement this so that when an AC user is on the AC app and opens a market link, the same thing will happen. This could also perhaps be used with my previous post and replace %PACKAGENAME% with %MARKETURL% as the users posted url variable, then use the above code to open the url in the play store when tapped. *Hint hint...
 
Last edited:

Forum statistics

Threads
943,144
Messages
6,917,506
Members
3,158,841
Latest member
kirk781