dynamic-rating

Ask and remind users to rate the app on Android.

APACHE-2.0 License

Stars
4
Committers
1

Dynamic Rating

A library to ask and remind users to rate the app on Android 4.0 (API 14) and above.

It uses AndroidX so, first migrate your project to AndroidX. It is dependent on Java 8 due to the dependency on Dynamic Utils. Since v1.1.0, it is targeting Java 17 to provide maximum compatibility. Since v1.2.0, the minimum SDK is Android 4.4 (API 19) to comply with the latest policies.


Contents


Installation

It can be installed by adding the following dependency to your build.gradle file:

dependencies {
    // For AndroidX enabled projects.
    implementation 'com.pranavpandey.android:dynamic-rating:1.2.0'
}

Usage

It has various conditions that must be met to ask for the rating from the user.

For a complete reference, please read the documentation.

Instance

DynamicRating instance must be used to access its methods.

// Get instance with application context.
DynamicRating.getInstance(applicationContext);

After that, its various public methods can be accessed via the returned instance.

Initialize

It should be initialized to set the first launch timestamp and to increase the counter when required.

// Initialize with default values.
DynamicRating.getInstance(applicationContext).initialize();

Rate

Call the shouldRate() method to check whether we can show the rating dialog to the user according to the set conditions.

// Get instance and then check if we should ask to rate.
// Returns `true` if all the rating conditions are met.
DynamicRating.getInstance(context).initialize().shouldRate();

Sponsor

Please become a sponsor to get a detailed guide and priority support.

Dependency

It depends on the dynamic-utils and dynamic-preferences to perform various internal operations. So, their functions can also be used to perform other useful operations.


Translations

  • Chinese (Traditional) (zh-rTW) - 人工知能

Author

Pranav Pandey


License

Copyright 2022-2024 Pranav Pandey

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package Rankings
Top 44.4% on Repo1.maven.org
Badges
Extracted from project README
License Release GitHub Follow on Twitter Donate via PayPal