Application Rate Dialog - States
There are several states that the service can be in:
ApplicationRater.STATE_MONITORING
: monitoring the system for conditions to display the rate dialogApplicationRater.STATE_LATER
: the user clicked on the "remind me later" button and the system will wait until the conditions have been metApplicationRater.STATE_DECLINED
: the user declined to rate the application by clicking on the "decline" buttonApplicationRater.STATE_RATED
: the user has clicked on the "rate" button. Nothing more will be done and this will be taken as the completed stateApplicationRater.STATE_PROMPT
: has prompted the user to rate the application, ie that the rate dialog has been displayed. This state is transitional and only while the dialog is being shown to the user.
You can access the current state by calling, state
:
- AIR
- Unity
var state:String = ApplicationRater.service.state;
string state = ApplicationRater.Instance.state;
The particular states control how the hasMetConditions
function processes the conditions and
triggers the dialog.
- In the
STATE_DECLINED
andSTATE_RATED
states,hasMetConditions
will always returnfalse
; - In the
STATE_MONITORING
state,hasMetConditions
will return based on the current set conditions; - In the
STATE_LATER
state thehasMetConditions
function will return after the set reminder period has passed.