With one line of code you can open up the mobile Android market from within your app! You can open the market to a specific application or to a page listing all of your apps. This is a great way to cross sell your applications and limit the number of clicks for a user to download your app.

Problem:
Linking to the Android market on a mobile web browser brings up a security warning saying “There are problems with the security certificate for this site.” This pop up is rather troublesome, who is actually going to click to continue? Even if they do the web interface doesn’t display very well on mobile devices. Let’s bypass this message all together and bring the user directly to the Android market app within the mobile device!

Solution:
Replace “https://market.android.com/” with “market://” for any valid market URL. It’s that easy! Just make sure to do this only within mobile applications. Desktop browsers and any other non-Android device will not know what to do with the “market://” preface. On the desktop use the standard URL and within mobile devices use the shorthand URL. This will ensure the best user experience for everyone and ensure the most downloads of your app.

Use this line of code in your AIR for Android Apps to bring up a search result (example ‘terry paton’):
navigateToURL(new URLRequest(“market://search?q=terry+paton”));

or link directly to an app with this:
navigateToURL(new URLRequest(“market://details?id=air.com.terrypaton.tc2″));

Navigating to “https://market.android.com/…” on an Android brings up this message:
Security warning message.

However, navigating to “market://search?q=terry+paton” brings the user to the market!
Terry Paton on the Android Market

A big thanks to Terry Paton for working with me on my mobile marketing campaign. Make sure to check out all of his awesome AIR for Android games on the market:
https://market.android.com/search?q=terry+paton

One thought on “Link Directly to the Mobile Android Market

Comments are closed.