In one of my recent applications there was a requirement to open other apps by same publisher in the respective stores on both iOS and Android platforms. After looking a bit over the internet and doing some experiments, I was able to find how to do so. Though the approaches are pretty straight forward and what most of ActionScript developers usually do on daily basis, I wanted to share it in case someone was looking for it.
To open an app on Apple App Store on an iOS device, simply use:
[cc lang=”actionscript3″]
navigateToURL(new URLRequest(“http://itunes.apple.com/us/app/moneyman/id503230204?ls=1&mt=8″));
[/cc]
To open an app in Google Play store, use the same method:
[cc lang=”actionscript3”]
navigateToURL(new URLRequest(“https://play.google.com/store/apps/details?id=air.com.bg1.lite”));
[/cc]
Using the above code will usually give option to either open the link in browser on the Google Play Store.
In case you want to directly open the app directly in the Google Play Store, you can use:
[cc lang=”actionscript3″]
market://details?id=air.com.bg1.lite
[/cc]
Here the parameter id is the reverse DNS nomenclature or unique id for your app.
Recommended Flash/Flex/AIR Mobile development readings:
- Professional Flash Mobile Development: Creating Android and iPhone Applications (Wrox Programmer to Programmer)
- Flash Mobile: Developing Android and iOS Applications (Visualizing the Web)
- Flash Mobile Application Development For Dummies
- Beginning Flash, Flex, and AIR Development for Mobile Devices
- Flash iOS Apps Cookbook
Thanks a lot… It works perfectly for me…