Button link to Market

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Button link to Market

Postby Skeniver » Thu Oct 08, 2009 3:11 pm

Hi there

I would like to create a button in an application that, when clicked, will take the user to another application in the market.

Could someone please shed some light on this topic for me. I'm sure its not hard, but can't think of what it may be called and so have struggled to find anything on it...

Thanks,
Neil
User avatar
Skeniver
Senior Developer
Senior Developer
 
Posts: 106
Joined: Tue Feb 03, 2009 3:51 pm
Location: Canterbury, UK

Top

Postby Croccy22 » Thu Oct 08, 2009 3:19 pm

Looks like you use Intents. I've not tried this yet but read it the other day when publishing an App to the market.

http://developer.android.com/guide/publ ... shing.html

There is a section there Titled "Using Intents to Launch the Market Application on a Device"

You could then easily link that to a button.

Matt.
Croccy22
Developer
Developer
 
Posts: 31
Joined: Wed Dec 03, 2008 3:15 pm

Postby Skeniver » Thu Oct 08, 2009 3:56 pm

Thanks Matt

That was what I was looking for. Intent indeed.

I also then found this post which helped:
http://www.anddev.org/viewtopic.php?p=24883

I haven't tried it on my phone yet (and the emulator gave a 404 error), but it seemed to work with the http://market... style string. The market:// version forced closed...

Thanks again!
User avatar
Skeniver
Senior Developer
Senior Developer
 
Posts: 106
Joined: Tue Feb 03, 2009 3:51 pm
Location: Canterbury, UK

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 2 guests