| Package | com.myflashlab.air.extensions.rateme |
| Class | public class RateMeApi |
| Inheritance | RateMeApi flash.events.EventDispatcher |
RateMe.api.
after you initialized the ANE with RateMe.init()
| Property | Defined By | ||
|---|---|---|---|
| appStoreGenreID : Number
(used in iOS only) This is the type of app, This is set automatically by calling an iTunes service, so you shouldn't need to set it manually for most purposes. | RateMeApi | ||
| appStoreID : Number
(used in iOS only) This should match the iTunes app ID of your application, which you can get from iTunes connect after setting up your app. | RateMeApi | ||
| autoPromote : Boolean
Set this to false to disable the rating prompt appearing automatically when the application launches or returns from the background. | RateMeApi | ||
| cancelBtnLabel : String
The button label for the button to dismiss the rating prompt without rating the app. | RateMeApi | ||
| daysUntilPrompt : int
This is the number of days the user must have had the app installed before they are prompted to rate it. | RateMeApi | ||
| launchesUntilPrompt : int
This is the minimum number of times the user must launch the app before they are prompted to rate it. | RateMeApi | ||
| message : String
The rating prompt message. | RateMeApi | ||
| messageUpdate : String
(used in iOS only) This is a message to be used for users who have previously rated the app, encouraging them to re-rate. | RateMeApi | ||
| onlyPromptIfLatestVersion : Boolean
(used in iOS only) Set this to false to enabled the rating prompt to be displayed even if the user is not running the latest version of the app. | RateMeApi | ||
| promptForNewVersionIfUserRated : Boolean
(used in iOS only) Because iTunes ratings are version-specific, you ideally want users to rate each new version of your app. | RateMeApi | ||
| rateBtnLabel : String
The button label for the button the user presses if they do want to rate the app. | RateMeApi | ||
| ratingsURL : String
(used in iOS only) The URL that the app will direct the user to so they can write a rating for the app. | RateMeApi | ||
| remindBtnLabel : String
The button label for the button the user presses if they don't want to rate the app immediately, but do want
to be reminded about it in future. | RateMeApi | ||
| remindPeriod : int
How long the app should wait before reminding a user to rate after they select the "remind me later" option
(measured in days). | RateMeApi | ||
| shouldPromote : Boolean [read-only]
Returns true if the prompt criteria have been met, and false if they have not. | RateMeApi | ||
| storeType : int
(used in Android only) Set the store type you wish to use for your rating. | RateMeApi | ||
| title : String
The title displayed for the rating prompt. | RateMeApi | ||
| useSKStoreReviewController : Boolean
(used in iOS only) indicates if the ANE should use the new in-app API for ratings. | RateMeApi | ||
| Method | Defined By | ||
|---|---|---|---|
monitor():void
starts monitoring your app launch and installed times to know if it should promote the rating dialog or not. | RateMeApi | ||
promote():void
This method will immediately trigger the rating prompt. | RateMeApi | ||
| appStoreGenreID | property |
appStoreGenreID:Number(used in iOS only) This is the type of app, This is set automatically by calling an iTunes service, so you shouldn't need to set it manually for most purposes.
public function get appStoreGenreID():Number public function set appStoreGenreID(value:Number):void| appStoreID | property |
appStoreID:Number(used in iOS only) This should match the iTunes app ID of your application, which you can get from iTunes connect after setting up your app. This value is not normally necessary and is generally only required if you have the aforementioned conflict between bundle IDs for your Mac and iOS apps, or in the case of Sandboxed Mac apps, if your app does not have network permission because it won't be able to fetch the appStoreID automatically using iTunes services.
public function get appStoreID():Number public function set appStoreID(value:Number):void| autoPromote | property |
autoPromote:Boolean
Set this to false to disable the rating prompt appearing automatically when the application launches or returns from the background.
The rating criteria will continue to be tracked, but the prompt will not be displayed automatically while this setting is in effect. You can use
this option if you wish to manually control display of the rating prompt.
public function get autoPromote():Boolean public function set autoPromote(value:Boolean):void| cancelBtnLabel | property |
cancelBtnLabel:StringThe button label for the button to dismiss the rating prompt without rating the app.
public function get cancelBtnLabel():String public function set cancelBtnLabel(value:String):void| daysUntilPrompt | property |
daysUntilPrompt:intThis is the number of days the user must have had the app installed before they are prompted to rate it. The time is measured from the first time the app is launched. The default value is 10 days.
public function get daysUntilPrompt():int public function set daysUntilPrompt(value:int):void| launchesUntilPrompt | property |
launchesUntilPrompt:intThis is the minimum number of times the user must launch the app before they are prompted to rate it. This avoids the scenario where a user runs the app once, doesn't look at it for weeks and then launches it again, only to be immediately prompted to rate it. The minimum use count ensures that only frequent users are prompted. The prompt will appear only after the specified number of days AND uses has been reached. This defaults to 10 uses.
public function get launchesUntilPrompt():int public function set launchesUntilPrompt(value:int):void| message | property |
message:StringThe rating prompt message. This should be polite and courteous, but not too wordy.
public function get message():String public function set message(value:String):void| messageUpdate | property |
messageUpdate:String(used in iOS only) This is a message to be used for users who have previously rated the app, encouraging them to re-rate. This allows you to customise the message for these users. If you do not supply a custom message for this case, the standard message will be used.
public function get messageUpdate():String public function set messageUpdate(value:String):void| onlyPromptIfLatestVersion | property |
onlyPromptIfLatestVersion:Boolean
(used in iOS only) Set this to false to enabled the rating prompt to be displayed even if the user is not running the latest version of the app.
This defaults to true because that way users won't leave bad reviews due to bugs that you've already fixed, etc.
public function get onlyPromptIfLatestVersion():Boolean public function set onlyPromptIfLatestVersion(value:Boolean):void| promptForNewVersionIfUserRated | property |
promptForNewVersionIfUserRated:Boolean
(used in iOS only) Because iTunes ratings are version-specific, you ideally want users to rate each new version of your app. Users who really love
your app may be willing to update their review for new releases. Set promptForNewVersionIfUserRated to true, and RateMe
will prompt the user again each time they install an update until they decline to rate the app. If they decline, they will not be asked again.
public function get promptForNewVersionIfUserRated():Boolean public function set promptForNewVersionIfUserRated(value:Boolean):void| rateBtnLabel | property |
rateBtnLabel:StringThe button label for the button the user presses if they do want to rate the app.
public function get rateBtnLabel():String public function set rateBtnLabel(value:String):void| ratingsURL | property |
ratingsURL:String(used in iOS only) The URL that the app will direct the user to so they can write a rating for the app. This is set to the correct value automatically.
public function get ratingsURL():String public function set ratingsURL(value:String):void| remindBtnLabel | property |
remindBtnLabel:StringThe button label for the button the user presses if they don't want to rate the app immediately, but do want to be reminded about it in future. Set this to "" if you don't want to display the remind me button - e.g. if you don't have space on screen.
public function get remindBtnLabel():String public function set remindBtnLabel(value:String):void| remindPeriod | property |
remindPeriod:intHow long the app should wait before reminding a user to rate after they select the "remind me later" option (measured in days). A value of zero means the app will remind the user next launch. Note that this value supersedes the other criteria, so the app won't prompt for a rating during the reminder period, even if a new version is released in the meantime. This defaults to 1 day.
public function get remindPeriod():int public function set remindPeriod(value:int):void| shouldPromote | property |
shouldPromote:Boolean [read-only]
Returns true if the prompt criteria have been met, and false if they have not. You can use this to decide when to
display a rating prompt if you have disabled the automatic display at app launch.
public function get shouldPromote():Boolean| storeType | property |
storeType:int
(used in Android only) Set the store type you wish to use for your rating. it's either RateMe.GOOGLEPLAY or RateMe.AMAZON
public function get storeType():int public function set storeType(value:int):void| title | property |
title:StringThe title displayed for the rating prompt. If you don't want to display a title then set this to "";
public function get title():String public function set title(value:String):void| useSKStoreReviewController | property |
useSKStoreReviewController:Boolean
(used in iOS only) indicates if the ANE should use the new in-app API for ratings. If set to true, the rating window will open inside your app without leaving your app at all.
if you are using the new API, you can prompt for ratings up to three times in a 365-day period. Users will submit a rating through the standardized prompt, and can authenticate with Touch ID to write and submit a review. For more information about SKStoreReviewController API, read here: https://developer.apple.com/app-store/ratings-and-reviews/
public function get useSKStoreReviewController():Boolean public function set useSKStoreReviewController(value:Boolean):void| monitor | () | method |
public function monitor():void
starts monitoring your app launch and installed times to know if it should promote the rating dialog or not. You must call this
method like RateMe.api.monitor(); only after you have configured all the settings. If you ever needed to the RateMe
settings inside your app, you have to call this method again after applying those changes to make sure the changes are effective.
| promote | () | method |
public function promote():void
This method will immediately trigger the rating prompt. If you are handeling RateMe manually, i.e you have set
RateMe.api.autoPromote = false;, you can use this method to show the dialog when appropriate. To know when is the appropriate
time, the RateMe.api.shouldPromote property can help you.
Notice on iOS This method depends on the appStoreID and appStoreGenreID properties, which are
only retrieved after polling the iTunes server, so if you intend to call this method directly, you will need to set these properties
yourself beforehand.
See also