https://github.com/lopspower/ratebottomsheet
To help to promote your android app by prompting users to rate your app in a BottomSheet ⭐️
https://github.com/lopspower/ratebottomsheet
android bottomsheet rate
Last synced: about 1 year ago
JSON representation
To help to promote your android app by prompting users to rate your app in a BottomSheet ⭐️
- Host: GitHub
- URL: https://github.com/lopspower/ratebottomsheet
- Owner: lopspower
- License: apache-2.0
- Created: 2020-01-15T09:46:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-22T18:45:18.000Z (about 4 years ago)
- Last Synced: 2025-03-14T11:04:19.989Z (about 1 year ago)
- Topics: android, bottomsheet, rate
- Language: Kotlin
- Homepage:
- Size: 1.34 MB
- Stars: 311
- Watchers: 12
- Forks: 29
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README


RateBottomSheet
=================
[](http://developer.android.com/index.html)
[](https://android-arsenal.com/api?level=16)
[](http://twitter.com/lopezmikhael)
This an Android library to help to promote your Android App by prompting users to **rate** your app in the Google Play Store with a material design friendly **BottomSheet**.
USAGE
-----
To used this usefull library you can grab it via Gradle:
```groovy
implementation 'com.mikhaellopez:ratebottomsheet:1.1.0'
```
KOTLIN
-----
```kotlin
RateBottomSheetManager(this)
.setInstallDays(1) // 3 by default
.setLaunchTimes(2) // 5 by default
.setRemindInterval(1) // 2 by default
.setShowAskBottomSheet(false) // True by default
.setShowLaterButton(false) // True by default
.setShowCloseButtonIcon(false) // True by default
.monitor()
// Show bottom sheet if meets conditions
// With AppCompatActivity or Fragment
RateBottomSheet.showRateBottomSheetIfMeetsConditions(this)
```
Override string xml resources on your application to change the texts in bottom sheet:
```xml
Like this App?
Do you like using this application?
Yes I do
Not really
Rate this app
Would you mind taking a moment to rate it? It won\'t take more than a minute. Thanks for your support!
Rate it now
Remind me later
No, thanks
```
LISTENER
-----
When calling `RateBottomSheet.showRateBottomSheetIfMeetsConditions(...)` you can choose to add another parameter of type `AskRateBottomSheet.ActionListener`; this allows you to implement 3 optional callbacks.
Here is how:
```kotlin
RateBottomSheet.showRateBottomSheetIfMeetsConditions(
this,
listener = object : AskRateBottomSheet.ActionListener {
override fun onDislikeClickListener() {
// Will be called when a click on the "I don't like" button is triggered
}
override fun onRateClickListener() {
// Will be called when a click on the "Rate" button is triggered
}
/*override fun onNoClickListener() {
// Will be called when a click on the "No thanks" button is triggered,
// in this example is commented,
// but each callback is optional and it's up to you whether to implement it or not!
}*/
}
)
```
DEBUG
-----
Enable `debugForceOpen` to show bottom sheet without conditions check like this:
```kotlin
RateBottomSheetManager(this)
.setDebugForceOpenEnable(true) // False by default
// Don't forget to run showRate function
RateBottomSheet.showRateBottomSheetIfMeetsConditions(this)
```
You can also enable logs with `debugLogEnable` properties:
```kotlin
RateBottomSheetManager(this)
.setDebugLogEnable(true) // False by default
```
Clear all current data from RateBottomSheet like this:
```kotlin
RateBottomSheetManager(this)
.clear()
```
JAVA
-----
You can call `showRateBottomSheetIfMeetsConditions` func like this:
```java
RateBottomSheet.Companion.showRateBottomSheetIfMeetsConditions(this);
```
And because this library it's write in Kotlin you need to add **kotlin-stdlib** dependency on your java project:
```groovy
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.71'
```
SUPPORT ❤️
-----
Find this library useful? Support it by joining [**stargazers**](https://github.com/lopspower/RateBottomSheet/stargazers) for this repository ⭐️
And [**follow me**](https://github.com/lopspower?tab=followers) for my next creations 👍
LICENCE
-----
RateBottomSheet by [Lopez Mikhael](http://mikhaellopez.com/) is licensed under a [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).