subtlerater

Discreet AppRater for Android

Лицензия

Лицензия

Группа

Группа

it.sephiroth.android.library.subtlerater
Идентификатор

Идентификатор

library
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

aar
Описание

Описание

subtlerater
Discreet AppRater for Android
Ссылка на сайт

Ссылка на сайт

http://blog.sephiroth.it
Система контроля версий

Система контроля версий

https://github.com/sephiroth74/SubtleRater

Скачать library

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/it.sephiroth.android.library.subtlerater/library/ -->
<dependency>
    <groupId>it.sephiroth.android.library.subtlerater</groupId>
    <artifactId>library</artifactId>
    <version>1.0.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/it.sephiroth.android.library.subtlerater/library/
implementation 'it.sephiroth.android.library.subtlerater:library:1.0.0'
// https://jarcasting.com/artifacts/it.sephiroth.android.library.subtlerater/library/
implementation ("it.sephiroth.android.library.subtlerater:library:1.0.0")
'it.sephiroth.android.library.subtlerater:library:aar:1.0.0'
<dependency org="it.sephiroth.android.library.subtlerater" name="library" rev="1.0.0">
  <artifact name="library" type="aar" />
</dependency>
@Grapes(
@Grab(group='it.sephiroth.android.library.subtlerater', module='library', version='1.0.0')
)
libraryDependencies += "it.sephiroth.android.library.subtlerater" % "library" % "1.0.0"
[it.sephiroth.android.library.subtlerater/library "1.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

SubtleRater

Discreet AppRater for Android

Inspired by the Discreen App Rate library, but with more customizations.

Installation

Using gradle, just add this to your dependencies:

compile 'it.sephiroth.android.library.subtlerater:library:+@aar'

Usage

Usage is quite simple. This is a common usage

SubtleRater.Builder builder = new SubtleRater.Builder( this );
builder.withListener( this );
builder.withDelay( 500 );
builder.hideAfter( 3000 );
builder.withPolicy( 
	new RetryPolicy.Builder( RetryPolicy.Policy.INCREMENTAL )
		.launchCount( 2 )
		.retryDelay( ONE_WEEK ).build()
);

SubtleRater mRater = builder.build();
mRater.show();

If auto hide is set ( using hideAfter ), then the view will be automatically hidden after a certain amount of time, otherwise you should call manually:

mRater.hide();

In order to understand the available policies which can be used with the withPolicy method:

The RetryPolicy builder has the following methods:

  • RetryPolicy( Policy ): is the constructor and the required policy enum has the following fields:

    • NONE: After the view has been shown to the user, it will never appear again.
    • INCREMENTAL: Will retry each time the initial count has been triggered (2, 4, 6, 8...)
    • EXPONENTIAL: Will retry exponentially to be less intrusive (2, 4, 8, 16...)
  • launchCount( long count ): After how many invocations the user will be notified

  • retryDelay( long ms ): To be used with INCREMENTAL or EXPONENTIAL. If set, once the SubtleRater is hidden without user interaction ( hideAfter is > 0 or hide is called manually ), a subsequent invocation of the show method will first check if enough time has passed before start checking the launchCount again. Use this to be less intrusive to your users.

Customization

The rater View/Animation can be customized using the Builder's methods withContent, inAnimation, outAnimation. Also the parent ViewGroup can be set ( otherwise the activity root will be used ).

For a more detailed example, see the demo application included.

Sample Video

Video

Версии библиотеки

Версия
1.0.0