Package com.zendesk.sdk.model.settings
Class RateMyAppSettings
- java.lang.Object
-
- com.zendesk.sdk.model.settings.RateMyAppSettings
-
- All Implemented Interfaces:
- java.io.Serializable
public class RateMyAppSettings extends java.lang.Object implements java.io.Serializable
This model represents all of the settings that can be retrieved from the server for theRateMyAppDialog
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description RateMyAppSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.String
getAndroidStoreUrl()
Gets the url to this app's android store.long
getDelay()
Gets the delay in milliseconds before the dialog will show up after you call itsRateMyAppDialog#show(...)
method.long
getDuration()
Gets the number of milliseconds after the first attempted launch that must elapse before the dialog is eligible to show.java.util.List<java.lang.String>
getTags()
Gets a copy of the list of tags that should be added to the ticket by defaultint
getVisits()
Gets the minimum number of visits to the screen that hosts theRateMyAppDialog
boolean
isEnabled()
Determines whether the dialog can be shown.
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
Determines whether the dialog can be shown. This has a higher precedence than other checks and if this is enabled then other checks will not be performed like incrementing the launch count.- Returns:
- true if the server allows the dialog to be shown, false otherwise
-
getVisits
public int getVisits()
Gets the minimum number of visits to the screen that hosts theRateMyAppDialog
For example, if the RateMyAppDialog is hosted on your main activity and this method returns 5 then the RateMyAppDialog will show on the 6th time your main activity shows (assuming that no other checks prevent showing the dialog)
- Returns:
- The number of visits that must be met in order to show the dialog
-
getDuration
public long getDuration()
Gets the number of milliseconds after the first attempted launch that must elapse before the dialog is eligible to show.The server sends back the value for delay in days. This method converts that to milliseconds.
- Returns:
- The number of milliseconds from the first call of
RateMyAppDialog#show(...)
that must have elapsed before the dialog may be eligible to be shown. Note that all other checks must also permit the dialog to be shown
-
getDelay
public long getDelay()
Gets the delay in milliseconds before the dialog will show up after you call itsRateMyAppDialog#show(...)
method.This assumes that all other checks permit the showing of the dialog. Note that the server sends back this time in seconds. This method converts that into milliseconds.
- Returns:
- The number of milliseconds that will occur before the dialog is shown after a call to
its
RateMyAppDialog#show(...)
show method.
-
getTags
public java.util.List<java.lang.String> getTags()
Gets a copy of the list of tags that should be added to the ticket by default- Returns:
- A copy of the list of tags to add or an empty list if none are to be added.
-
getAndroidStoreUrl
public java.lang.String getAndroidStoreUrl()
Gets the url to this app's android store. This will be the URL that is opened when the "yes, rate my app" button is tapped in theRateMyAppDialog
- Returns:
- The url of this app on an android store.
-
-