google play - Android HttpURLConnection cannot redirect to "market://details?id=my.package.name" -


i launching httpurlconnection android device points server i.e. http://example.com/download-app. server receives request , issues redirect market://details?id=my.package.name. aim have android market app on phone open , navigate app download page.

however, doesn't seem work. set redirects true on httpurlconnection i.e.

httpurlconnection.setfollowredirects(true); 

but url receive same url server i.e. http://example.com/download-app.

if use redirect link using "http" protocol http://market.android.com/details?id=my.package.name, works instead opens new web based market not app on phone.

has else experienced this?

the aim have android market app on phone open , navigate app download page.

then why using httpurlconnection?

if want view web page, use action_view intent:

startactivity(new intent(intent.action_view, uri.parse("http://example.com/download-app"))); 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -