Skip to content
MariusVolkhart edited this page Dec 13, 2014 · 15 revisions

List of library settings

V1.0.20

⬆️ 2014-03-07

  • Text to be displayed in the view
    text(String text)
    text(int textResource)
  • Initial times it has to be called before the view is shown
    initialLaunchCount(int initialLaunchCount)
    retryPolicy(RetryPolicy policy)
  • Listener used to get callback from the lifecycle
    listener(OnShowListener onShowListener)
  • Delay the view's showing time
    delay(int delay)

V1.0.3

⬆️ 2014-03-08

  • Theme to use for the view (LIGHT or DARK)
    theme(AppRateTheme theme)
  • Add a constraint to show the view only if the app is installed for more than a duration (in sec.)

⚠️⚠️⚠️Deprecated See here

    atLeastInstalledSince(long installedSince)
  • Enable debug mode which will send state when actions are triggered
    debug(boolean debug)
  • Shows the view on top
    fromTop(boolean fromTop)

V1.0.4

⬆️ 2014-03-15

  • Pause duration after a crash (in sec.). ⚠️ Calling action initExceptionHandler() is mandatory to make it work.

⚠️⚠️⚠️Deprecated See here

    pauseTimeAfterCrash(long pauseAfterCrash)

⚠️⚠️⚠️Deprecated See here

    minimumMonitoringTime(long minimumMonitoringTime)
  • Set the minimum interval between two launches to increment the count

⚠️⚠️⚠️Deprecated See here

    minimumInterval(long minimumInterval)

V2.0

Some methods have been deprecated to use milliseconds instead of seconds:

  • Pause duration after a crash (in ms.). ⚠️ Calling action initExceptionHandler() is mandatory to make it work.
    pauseAfterCrash(long pauseAfterCrash)
    minMonitoringTime(long minimumMonitoringTime)
  • Set the minimum interval between two launches to increment the count
    minInterval(long minimumInterval)
  • Add a constraint to show the view only if the app is installed for more than a duration (in ms.)
    installedSince(long installedSince)

New feature

  • Set the view to display
public AppRate view(int view)

The view will be inflated and respects two view ids, dar_close and dar_rate_element. The text of the dar_rate_element will be set with AppRate.setText(). An example XML layout file might look like

<LinearLayout
    style="?android:attr/buttonBarStyle"
    android:layout_width="match_parent"
    android:layout_height="48dp"
    android:orientation="horizontal">

    <Button
        android:id="@+id/app_rate_never"
        style="?android:attr/buttonBarButtonStyle"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:text="Never" />

    <!-- The id has been set to dar_close to get the lib behavior -->
    <Button
        android:id="@+id/dar_close"
        style="?android:attr/buttonBarButtonStyle"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:text="Later" />

    <!-- The id has been set to dar_rate_element to get the lib behavior. Text is managed by AppRate.setText() -->
    <Button
        android:id="@+id/dar_rate_element"
        style="?android:attr/buttonBarButtonStyle"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1" />
</LinearLayout>
Clone this wiki locally