subtlerater

Discreet AppRater for Android

License

License

GroupId

GroupId

it.sephiroth.android.library.subtlerater
ArtifactId

ArtifactId

library
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

aar
Description

Description

subtlerater
Discreet AppRater for Android
Project URL

Project URL

http://blog.sephiroth.it
Source Code Management

Source Code Management

https://github.com/sephiroth74/SubtleRater

Download library

How to add to project

<!-- 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"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.0.0