kobakei / android-ratethisapp Goto Github PK
View Code? Open in Web Editor NEWAndroid library to show "Rate this app" dialog
License: Apache License 2.0
Android library to show "Rate this app" dialog
License: Apache License 2.0
If RateThisApp.showRateDialogIfNeeded() called multiple times while app execution, the dialog appears on each call. Even if mLaunchTimes > 1.
I think we need to update the value of the mLaunchTimes, mOptOut and mAskLaterDate after each showRateDialog() call.
Please move to mavenCentral
Hi,
Really great API, gratz!
Just one thing, when we try to upload our app on Play Store compile with bundle (app-release.aab) instead of apk, Play Console throws and error saying "language not recognized : gr".
Hi,
I found an error:
In my opinion this is an error. You should bild/use user specific preference keys.
Thanks,
Mario
Info:
Code:
build.gradle:
dependencies {
(...)
implementation 'io.github.kobakei:ratethisapp:1.0'
}
settings.gradle:
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
rootProject.name = "app-name"
include ':app'
Error:
Could not GET 'https://jitpack.io/io/github/kobakei/ratethisapp/1.0/ratethisapp-1.0.pom'.
Received status code 401 from server: Unauthorized
It was tried with the dependency:
maven { url 'https://maven.aliyun.com/repository/jcenter' }
Error:
Unresolved dependencies
Could not resolve io.github.kobakei:ratethisapp:1.0.
Hi, For my job, I want to separate event tap out-side and tap cancel button. I must checkout the source, edit something then build @aar file.
I tried to add library but it gives error. Have a look at the build gradle
build.gralde(project-level)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.novoda:bintray-release:0.3.4'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
build.gradle(app level)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "xxx.xxxx.xxxxxx"
minSdkVersion 9
targetSdkVersion 25
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.google.android.gms:play-services-ads:8.1.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'io.github.kobakei:ratethisapp:x.y.z'
compile 'com.android.support:appcompat-v7:25.2.0'
}
Is there a way to make it not inherit your app's colors so that you can customize them?
I was having the following error when I tried using the code in an Activity:
You need to use a Theme.AppCompat theme (or descendant) with this activity
This is because in my AndroidManifest.xml I'm using the following theme:
android:theme="@android:style/Theme.NoTitleBar"
Changing the above to the below for the Activity that shows the RateApp dialog fixed this for me.
android:theme="@style/Theme.AppCompat.NoActionBar"
I got this solution from the below article:
http://stackoverflow.com/questions/21814825/you-need-to-use-a-theme-appcompat-theme-or-descendant-with-this-activity
README shows Configuration config = new Configuration(3, 5);
It should be:
RateThisApp.Config config = new RateThisApp.Config(3, 5);
Hi,
I think that you should set mOptOut
property inside setOptOut
method. ATM when i choose "never" and call showRateDialogIfNeeded
in the same session, dialog appears again.
How to set a custom color for each button?
Hi!
Noticed that you don't yet have dependency information in the readme. How about:
https://jitpack.io/#kobakei/Android-RateThisApp/v1.0
We're seeing users trying to install Android-RateThisApp using JitPack already.
I had incorporated the rate this app dialog box into my app last year. It was working perfectly for sometimes but later it stopped showing the rate this dialog box. Any idea what can be the reasons for this.
I was using the following condition in oncreate method ;
// Custom condition: 3 days and 5 launches
RateThisApp.Config config = new RateThisApp.Config(3, 5);
RateThisApp.init(config);
Do we need to use the following in Oncreate method;
RateThisApp.onCreate(this);
How to check if dialog is eligible to be shown with an if statement?
I just want to set a title and a message from a string variable. But actually the methods requires an int from resource. Could you add those two methods?!?
Thank you.
The dutch translation is not working; although the changelog says it is
After user click no or cancle rating dialog, i want to reset app launch times. Help me!
Missing events for show dialog and selected options.
i want to track it with Google analitics
Thanks
I am trying to use this dialog with Arabic text, the body and buttons are aligned correctly, but the title is still left-aligned.
Any ideas on how to correctly align it? I tried to pass a theme
resource but still without success.
Is there a way to make the rate button go to the Amazon store if on a Kindle device?
Maybe consider adding the requirement that users add jcenter
to your readme if they're integrating via gradle e.g. in build.gradle
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
jcenter()
}
How to change the order of Rating Yes, no, cancel links in the dialog box?
How to prevent close dialeg when touch outside?
the rating dialog get shown at first run after installing the app on my samsung J7
There are only two buttons, "Later" and "NO"?
And can I change their meaning?
Thanks
As title says because of this:
"Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018"
you can see on line 239 that the custom URL is ignored when there is an exception.
On the emulator there is an exception because the play store is not installed.
I use a Intent to launch the Play Store if a preference (Rate the app) is clicked.
So I would like to disable the pop of the rating dialog.
This line in onStart returns the same date no matter how many times I uninstall the app.
mInstallDate = new Date(pref.getLong(KEY_INSTALL_DATE, 0));
The result is that on my test device I cannot properly test the functionality of RateThisApp because the prompt is always triggered on a fresh install. According to this SO post Android automatically backs up preferences to your account since SDK 21: http://stackoverflow.com/questions/15873066/how-to-remove-shared-preference-while-application-uninstall-in-android
However I already have android:allowBackup="false"
and am still experiencing this issue. Does anyone have any suggestions?
This library crashes with a StackOverFlow exception on Android 13 devices.
It enters a loop on in the callback methods:
com.kobakei.ratethisapp.RateThisApp.onCancelClicked (RateThisApp.java:475)
com.kobakei.ratethisapp.RateThisApp.onNoClicked (RateThisApp.java:467)
and the OnYesClicked too.
Maybe it's too early but it doesn't look like the latest release has made it to the Maven central repo yet.
The cancel callback function is not called if the user presses the back button when the dialog is shown.
Hi, first of all, thank you so much for creating this library. As I tried on Android Marshmallow, the title and message are missing. I see in RateThisApp.java:showRateDialog(), it still uses AlertDialog which uses a different constructor with theme for Android Lollilop and Marshmallow. As the result, I change the code (as described on here) and it works like a charm.
So, I hope it will be fixed on the next release.
*Sorry for my English. 👯
master
Originally posted by @Hojjat13 in #119 (comment)
I got an exception because the activity already be destroyed but dialog still showing,
Could you provide hide dialog API?
E/WindowManager: android.view.WindowLeaked: Activity has leaked window DecorView@411d6b4[] that was originally added here
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:418)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:331)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
at android.app.Dialog.show(Dialog.java:322)
at android.support.v7.app.AlertDialog$Builder.show(AlertDialog.java:955)
at com.kobakei.ratethisapp.RateThisApp.showRateDialog(RateThisApp.java:255)
at com.kobakei.ratethisapp.RateThisApp.showRateDialog(RateThisApp.java:170)
Calling RateThisApp.onStart(this);
causes several StrictMode policy violations, mostly related to reading and writing to disk (shared preferences) on the main thread. This should be done on a background thread/asynchronously.
The moment we ask users to rate our App is very important, should be done nicely and in a not-disturbing way. To try to engage people, I want to set message in runtime, not only by StringRes id. So if I have a logged in customer, I want to show something like:
"Hello, William! Today we want to ask you a few seconds of your time to bla bla bla..."
This can be easily achieved by allowing access to Config object creating a .setMessage(String message) public method!
From what I can tell the onStart
life-cycle method is fired every time an AppCompatActivity
becomes visible again. Doesn't this mean calling RateThisApp.onStart(this);
in protected void onStart()
could result in the startup counter incrementing multiple times in one user session? In my applications the MainActivity represents a home page and a user can easily navigate away and come back again 10-20 times in a single session.
If my understanding above is correct I would recommend you suggest RateThisApp.onStart(this);
be called in the launcher Activity's onCreate
method instead as this should persist for the duration of the user's session.
dependencies resolution is failed.
The current folder name for a greek translation is called values-gr which is wrong.
It needs to be named values-el.
From https://material.io/guidelines/components/dialogs.html#dialogs-specs
Number of actions
Dialogs should not include more than two actions. A third action, such as “Learn more,” navigates away from the dialog, potentially leaving the task unfinished.
Avoid using a “Learn more” action to access help documentation; in-line expansion within the dialog should be used instead. If more extensive information is needed, provide it prior to entering the dialog.
Is there anything you can do to fulfill the guidelines for the best user experience?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.