Class StoreReview
Inheritance
Namespace: EasyMobile
Assembly: cs.temp.dll.dll
Syntax
public class StoreReview : MonoBehaviour
Methods
CanRequestRating()
Determines if a rating request can be made, which means:
- it was not previously disabled by the user (Don't ask again)
- the user hasn't accepted to rate before
- other display constraints are satisfied
This method always returns
true
ifoption is checked in module settings and the current build is a development one, unless the rating request was disabled (the user either selected Don't ask again or already accepted to rate before).
Declaration
public static bool CanRequestRating()
Returns
Type | Description |
---|---|
System.Boolean |
|
DisableRatingRequest()
Disables the rating request dialog show that it can't be shown anymore.
Declaration
public static void DisableRatingRequest()
GetAnnualRequestsLimit()
Gets the maximum number of requests that can be made per year.
Declaration
public static int GetAnnualRequestsLimit()
Returns
Type | Description |
---|---|
System.Int32 | The annual requests limit. |
GetDefaultDialogContent()
Gets the default content of the rating dialog as configured in the module settings.
Declaration
public static RatingDialogContent GetDefaultDialogContent()
Returns
Type | Description |
---|---|
RatingDialogContent | The default dialog content. |
GetLastRequestTimestamp()
Gets the timestamp of the last request in local time. If no request was made previously, Epoch time (01/01/1970) will be returned.
Declaration
public static DateTime GetLastRequestTimestamp()
Returns
Type | Description |
---|---|
System.DateTime | The last request timestamp. |
GetRemainingCoolingOffDays()
Gets the remaining cooling-off days until the next request can be made.
Declaration
public static int GetRemainingCoolingOffDays()
Returns
Type | Description |
---|---|
System.Int32 | The remaining cooling-off days. |
GetRemainingDelayAfterInstallation()
Gets the remaining delay time (days) after installation that is required before the first rating request can be made.
Declaration
public static int GetRemainingDelayAfterInstallation()
Returns
Type | Description |
---|---|
System.Int32 | The remaining delay time after installation in days. |
GetThisYearRemainingRequests()
Gets the number of unused requests in this year. Note that this is not applicable to iOS 10.3 or newer.
Declaration
public static int GetThisYearRemainingRequests()
Returns
Type | Description |
---|---|
System.Int32 | This year unused requests. |
GetThisYearUsedRequests()
Gets the number of requests used this year.
Declaration
public static int GetThisYearUsedRequests()
Returns
Type | Description |
---|---|
System.Int32 | The this year used requests. |
IsDisplayConstraintIgnored()
Returns true
if the
Declaration
public static bool IsDisplayConstraintIgnored()
Returns
Type | Description |
---|---|
System.Boolean |
|
IsRatingRequestDisabled()
Determines if the rating request dialog has been disabled. Disabling occurs if the user either selects the "refuse" button or the "rate" button. On iOS, this is only applicable to versions older than 10.3.
Declaration
public static bool IsRatingRequestDisabled()
Returns
Type | Description |
---|---|
System.Boolean |
|
RequestRating()
Shows the rating request dialog with the default behavior and content.
Declaration
public static void RequestRating()
RequestRating(RatingDialogContent)
Shows the rating request dialog with the default behavior and the given content. Use this method if you want to localize the dialog on Android or iOS older than 10.3 (on iOS 10.3 or newer, the rating dialog content is controlled by the system).
Declaration
public static void RequestRating(RatingDialogContent dialogContent)
Parameters
Type | Name | Description |
---|---|---|
RatingDialogContent | dialogContent | Dialog content. |
RequestRating(RatingDialogContent, Action<StoreReview.UserAction>)
On Android or iOS older than 10.3, this method shows the rating request dialog with the given content and the callback will be invoked when the popup closes. You can use this method if you want to implement a custom behavior for the rating dialog. If you also want to localize it, pass a RatingDialogContent object holding the localized content, otherwise pass null to use the default content. On iOS 10.3 or newer, the system rating prompt is used, therefore the callback won't be invoked, and the dialog content is controlled by the system.
Declaration
public static void RequestRating(RatingDialogContent dialogContent, Action<StoreReview.UserAction> callback)
Parameters
Type | Name | Description |
---|---|---|
RatingDialogContent | dialogContent | Dialog content, pass null to use the default content. |
System.Action<StoreReview.UserAction> | callback | Callback receiving user selection as input. You need to implement this callback to take appropriate actions corresponding to the user input. |