Dave Bilodeau
Dave Bilodeau

Reputation: 249

Flex Mobile Open App Store for Reviews

Using Flash Builder/Flex Mobile, is there a way to create a button in an iphone/ipad app that will redirect and open the app store/review section of your application? Just trying to find a way to get users to rate my app.

Thanks!

Upvotes: 1

Views: 423

Answers (2)

Dave Bilodeau
Dave Bilodeau

Reputation: 249

OK I think I have a full answer now. Thanks to Flextras and some googling.

So to make a button that will redirect to Apple Store review page for your app in Flex Mobile project..

<fx:Script>
    <![CDATA[
        import flash.net.navigateToURL;
        protected function clickHandler(event:MouseEvent):void
        {
            var urlReq:URLRequest = new URLRequest("https://userpub.itunes.apple.com/WebObjects/MZUserPublishing.woa/wa/addUserReview?id=(YOU APP ID GOES HERE)&type=Purple+Software");
            navigateToURL(urlReq, "_self");
        }
    ]]>
</fx:Script>

Then the button..

<s:Button y="720" width="65%" height="70" label="Rate this App"
   click="clickHandler(event)" /> 

Upvotes: 1

JeffryHouser
JeffryHouser

Reputation: 39408

Assuming you have a URL that you want to open, you can use navigateToURL to do so:

var myURL :String = 'URL to your iOS application';
navigateToURL(new URLRequest(myURL));

Then just trigger that code from the click event of a button.

Upvotes: 2

Related Questions