A lightweight non intrusive app rate reminder for Android

Overview

Discreet App Rate

A lightweight non intrusive app rate reminder for Android

Screenshot

Download

repositories {
    mavenCentral()
}

dependencies {
    compile 'fr.nicolaspomepuy:discreetapprate:2.0.3@aar'
}

Usage

AppRate.with(MyActivity.this).checkAndShow();

All the following settings and actions can be chained.

API

Please visit the Wiki section to read the full API

Sample

Available in the Google Play Store

License

 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.
Comments
  • Use more beautiful libraries to show the rate bar.

    Use more beautiful libraries to show the rate bar.

    The app rate bar is definitely not customizable. The height of it also fixed. It is actually better to keep it short but I think there should not be a restriction.

    I think other libraries for showing alerts can be used in this library and it can be great actually. Crouton can be used. It has to be customized a lot I think. SuperToasts may be better for this.

    I think it will be more discreet :)

    I can do it if it is ok. I want to discuss it here before integrating it.

    opened by tasomaniac 12
  • ActivityNotFoundException in simulator

    ActivityNotFoundException in simulator

    Clicking on AppRate view in simulator (device which cannot handle "market" Intent) causes ActivityNotFoundException. try-catch should be used.

    E/AndroidRuntime( 1395): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.mypackage } E/AndroidRuntime( 1395): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1632) E/AndroidRuntime( 1395): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424) E/AndroidRuntime( 1395): at android.app.Activity.startActivityForResult(Activity.java:3424) E/AndroidRuntime( 1395): at android.app.Activity.startActivityForResult(Activity.java:3385) E/AndroidRuntime( 1395): at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:839) E/AndroidRuntime( 1395): at android.app.Activity.startActivity(Activity.java:3627) E/AndroidRuntime( 1395): at android.app.Activity.startActivity(Activity.java:3595) E/AndroidRuntime( 1395): at fr.nicolaspomepuy.discreetapprate.AppRate$2.onClick(AppRate.java:438) E/AndroidRuntime( 1395): at android.view.View.performClick(View.java:4438) E/AndroidRuntime( 1395): at android.view.View$PerformClick.run(View.java:18422) E/AndroidRuntime( 1395): at android.os.Handler.handleCallback(Handler.java:733) E/AndroidRuntime( 1395): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 1395): at android.os.Looper.loop(Looper.java:136) E/AndroidRuntime( 1395): at android.app.ActivityThread.main(ActivityThread.java:5017) E/AndroidRuntime( 1395): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 1395): at java.lang.reflect.Method.invoke(Method.java:515) E/AndroidRuntime( 1395): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) E/AndroidRuntime( 1395): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) E/AndroidRuntime( 1395): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 447): Force finishing activity com.mypackage/com.mypackage.LiveViewActivity

    opened by alexeyvasilyev 6
  • Use FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET when launching Play Store Intent

    Use FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET when launching Play Store Intent

    If the user presses the rate view and opens the Play Store app and then presses HOME and then opens the initial app, it shows the Play Store app instead of showing the last screen before going to Play Store. To fix this, we need to use FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET.

    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + activity.getPackageName())) intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); activity.startaActivity(intent);

    http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET

    opened by kaciula 6
  • Manifest merging failed

    Manifest merging failed

    When i update from version 1.0.5 to 2.0.2, i am getting this:

    [warn] [.../com.android.support-appcompat-v7-21.0.0-rc1/AndroidManifest.xml:3] Failed to parse <uses-sdk minSdkVersion='L'>: must be an integer number or codename.
    [warn] [.../com.android.support-appcompat-v7-21.0.0-rc1/AndroidManifest.xml:3] Failed to parse <uses-sdk targetSdkVersion='L'>: must be an integer number or codename.
    [warn] [.../com.android.support-support-v4-21.0.0-rc1/AndroidManifest.xml:3] Failed to parse <uses-sdk minSdkVersion='L'>: must be an integer number or codename.
    [warn] [.../com.android.support-support-v4-21.0.0-rc1/AndroidManifest.xml:3] Failed to parse <uses-sdk targetSdkVersion='L'>: must be an integer number or codename.
    [info] Performing full resource merge
    java.lang.RuntimeException: Manifest merging failed. See console for more info.
            at com.android.builder.core.AndroidBuilder.doMerge(AndroidBuilder.java:920)
            at com.android.builder.core.AndroidBuilder.mergeLibraryManifests(AndroidBuilder.java:906)
            at com.android.builder.core.AndroidBuilder.processManifest(AndroidBuilder.java:612)
            at android.Tasks$$anonfun$58.apply(tasks.scala:912)
            at android.Tasks$$anonfun$58.apply(tasks.scala:899)
            at scala.Function9$$anonfun$tupled$1.apply(Function9.scala:35)
            at scala.Function9$$anonfun$tupled$1.apply(Function9.scala:34)
            at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
            at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
            at sbt.std.Transform$$anon$4.work(System.scala:64)
            at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
            at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
            at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
            at sbt.Execute.work(Execute.scala:244)
            at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
            at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
            at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
            at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:745)
    [error] (android:processManifest) Manifest merging failed. See console for more info.
    

    It seems like this library is pulling in the latest android support revisions.

    Could it be that the "+" is causing it to do that?

    dependencies {
    compile 'com.android.support:appcompat-v7:+'
    }
    
    opened by Thangiee 4
  • Please explain better how to use an custom view

    Please explain better how to use an custom view

    Looks like custom views are pretty undocumented. Looks like the lib searches for specific IDs. And also it overrides the text on the "rate" button. Custom views are not useable this way

    opened by macsystems 2
  • Rename strings.xml

    Rename strings.xml

    Like the user suggested in issue #13, I also just copy the source into my project. This means that I have to manually merge strings.xml.

    Please could you rename strings.xml so that I can just copy as is.

    For example discreet-app-rate.xml

    opened by neilboyd 2
  • View.setBackground is available only for API level 16 and above

    View.setBackground is available only for API level 16 and above

    I get the following exception report:

    java.lang.NoSuchMethodError: android.view.View.setBackground
    at fr.nicolaspomepuy.discreetapprate.AppRate.showAppRate(AppRate.java:568)
    at fr.nicolaspomepuy.discreetapprate.AppRate.checkAndShow(AppRate.java:355)
    

    To get rid of it I set the following two lines to use setBackgroundDrawable method (although I know it might not be the best fix):

    close.setBackground(activity.getResources().getDrawable(R.drawable.selectable_button_light));
    
    close.setBackground(activity.getResources().getDrawable(R.drawable.selectable_button_dark));
    
    opened by bartek-mindojo 2
  • Not compatible with Android 2.2 and below.

    Not compatible with Android 2.2 and below.

    The library uses reflection to get "firstInstallTime" (PackageInfo) which is available for API 9 and above. However for API 8 and below AppRate will generate NullPointerException on calling checkAndShow() method.

    // AppRate.java Date installDate = Utils.installTimeFromPackageManager(activity.getPackageManager(), activity.getPackageName()); Date now = new Date(); if (now.getTime() - installDate.getTime() < installedSince * 1000) { // <<<<<<<<<< NullPointerException for Android 2.2 and below!!!!

    // Utils.java public static Date installTimeFromPackageManager( PackageManager packageManager, String packageName) { .... // field wasn't found return null; }

    opened by alexeyvasilyev 2
  • Network state check

    Network state check

    AppRate check application network state and try to avoid not to be seen in offline state. In this way, users will see AppRate only when they can connect Google Play Store.

    opened by kozaxinan 2
  • Fix an issue which will show the AppRateBar behind the ActionBar

    Fix an issue which will show the AppRateBar behind the ActionBar

    Create a new method to get the ActionBarHeight --> Move this method to the Utils like your method getStatusBarHeight

    With the previous attempt to get the ActionBarSize it caused some issue if the TranslucentDecorView was used. See the screenshot on the bottom.

    Now it should work in 90% of the cases. It will still cause issues if someone has a custom-rom with a different ActionBarSize.

    For my private projects i use the DrawInsetsLayout but we can't use it here.

    screenshot_2014-05-25-13-22-43

    opened by mikepenz 1
  • Crash on Android 2.2

    Crash on Android 2.2

    Master branch

    java.lang.NoSuchMethodError: android.content.SharedPreferences$Editor.apply at fr.nicolaspomepuy.discreetapprate.AppRate.commitEditor(SourceFile:652) at fr.nicolaspomepuy.discreetapprate.AppRate.incrementViews(SourceFile:464) at fr.nicolaspomepuy.discreetapprate.AppRate.checkAndShow(SourceFile:320)

    The error occurs in the code:

    private void commitEditor() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {
            editor.apply();
        } else {
            editor.commit();
        }
    }
    

    Change Build.VERSION_CODES.FROYO to Build.VERSION_CODES.GINGERBREAD.

    opened by alexeyvasilyev 1
  • Added the ability to request a star rating.

    Added the ability to request a star rating.

    Sample image

    Allows you to prompt the user to enter a star rating, and optionally listen for the rating they provide and perform different actions on whether it was above or below a threshold.

    Also, updated build tools and support lib version.

    opened by iainconnor 2
  • Custom UI and nested levels

    Custom UI and nested levels

    Apologies for posting my question here as it is not really an issue and I didn't find a better way to contact the author.

    Is it possible to have "nested" navigation in snackbar, i.e. first display : do you like app : yes / no and then depending on action -> "snackbar" displays next set of options, with logic similar to this

    Also, Am I right in assumption that layout of "snackBar" is fully customized ?

    opened by kiruwka 0
  • Is there a similar library for asking for a survey?

    Is there a similar library for asking for a survey?

    Something that would be a 2 line snackbar - with Line 1 being : Where did you hear about us? Line 2 : A) Facebook B) Twitter C) others, and user can click on one of the 3 actions

    opened by somghosh 0
  • Crash on click if no app installed which can handle

    Crash on click if no app installed which can handle "market://" intent

    Steps to reproduce:

    1. Run in emulator or any other device which do not have Google Play installed.
    2. Call forceShow(). The apprate is shown.
    3. Press on AppRate to get a crash android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.myproject flg=0x10000000 }

    Fix 1: In forceShow() should be if (!Utils.isGooglePlayInstalled(activity)) { if (debug) LogD("Play Store is not installed. Won't do anything"); return; }

    instead of if (!Utils.isGooglePlayInstalled(activity)) { if (debug) LogD("Play Store is not installed. Won't do anything"); }

    Fix 2: Use try {} catch (Exception e) {} in onClick() while calling Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + packageName)); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); activity.startActivity(intent);

    opened by alexeyvasilyev 1
Celebrate more with this lightweight confetti particle system 🎊

Konfetti ?? ?? Celebrate more with this lightweight confetti particle system. Create realistic confetti by implementing this easy to use library. Demo

Dion Segijn 2.7k Jan 2, 2023
:balloon: A lightweight popup like tooltips, fully customizable with an arrow and animations.

Balloon ?? A lightweight popup like tooltips, fully customizable with arrow and animations. Including in your project Gradle Add below codes to your r

Jaewoong Eum 2.8k Jan 5, 2023
Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

Rizki Maulana 118 Dec 14, 2022
A Lightweight Framework for Code Generating

Codegen A lightweight framework for code generating. Why Codegen? In Java/Kotlin world, engineers usually use JavaPoet or KotlinPoet for code generati

Johnson Lee 38 Dec 20, 2022
A tiny window overlay to log app internal on top of your android app

DebugOverlay A logcat alike overlay to display log messages in your app as independent overlay. Typically in android you would log some app internals

Hannes Dorfmann 150 Nov 29, 2022
This a Ride User app in which in integrate almost every features of a Ride Share app.

My-Ride-App This a Ride app(User) in which I integrate almost every features of a Ride Share app. Here I use kotlin programing language, Google map SD

Khairul Islam 5 Apr 27, 2022
Useful library to use custom fonts in your android app

EasyFonts A simple and useful android library to use custom fonts in android apps without adding fonts into asset/resource folder.Also by using this l

Vijay Vankhede 419 Sep 9, 2022
A util for setting status bar style on Android App.

StatusBarUtil A util for setting status bar style on Android App. It can work above API 19(KitKat 4.4). δΈ­ζ–‡η‰ˆη‚Ήζˆ‘ Sample Download StatusBarUtil-Demo Chang

Jaeger 8.8k Jan 7, 2023
Make a cool intro for your Android app.

AppIntro AppIntro is an Android Library that helps you build a cool carousel intro for your App. AppIntro has support for requesting permissions and h

AppIntro Team 10.3k Dec 30, 2022
StandOut lets you easily create floating windows in your Android app.

Coming Soon Meanwhile, checkout the demo video at http://www.youtube.com/watch?v=S3vHjxonOeg Join the conversation at http://forum.xda-developers.com/

Mark Wei 1.2k Dec 12, 2022
Floating Notification for Android app - Facebook ChatHeads Notification system

FloatingView (Application Demo on Play Store) DEPRECATED SEE FloatingView Floating View for Android app - Facebook ChatHeads Notification system This

Fernandez Anthony 530 Nov 17, 2022
Modern About Box for an Android App

About Box A modern About Box for an Android App built on the daniel-stoneuk/material-about-library. Easily display the common items of an About Box in

Quality Mobile Puzzle Apps 91 Nov 11, 2022
Android library implementing a poppy view on scroll, similar to the one found in the Google Plus app

PoppyView PoppyView is a library which implements view on the bottom which come and go relative to the user scroll. It can be seen in the Google plus

Flavien Laurent 409 Nov 23, 2022
Floating Notification for Android app - Facebook ChatHeads Notification system

FloatingView (Application Demo on Play Store) DEPRECATED SEE FloatingView Floating View for Android app - Facebook ChatHeads Notification system This

Fernandez Anthony 530 Nov 17, 2022
Android Material Json Form Wizard is a library for creating beautiful form based wizards within your app just by defining json in a particular format.

Android Json Wizard Android Json Wizard is a library for creating beautiful form based wizards within your app just by defining json in a particular f

Vijay Rawat 355 Nov 11, 2022
Make a cool intro for your Android app.

AppIntro AppIntro is an Android Library that helps you build a cool carousel intro for your App. AppIntro has support for requesting permissions and h

AppIntro Team 40 Jan 3, 2023
Implement a simple and funny Android animation β€”β€” the emoji rain in WeChat app.

δΈ­ζ–‡η‰ˆζ–‡ζ‘£ Emoji Rain Hey, it's raining emoji! This is a really simple and funny animation for Android. You could find similar animations when sending "Hap

LoLo 615 Nov 21, 2022
Compose app with dummy data which serves as a playground to try out new things in the Android world.

Music Event Manager Compose app with dummy data which serves as a playground to try out new things in the Android world. Description The app primarily

Igor Tepavac 4 Apr 4, 2022
Modern GTD(Get Things Done) Android App

Neo Flow A modern GTD Android App to improve your workflow Explore the docs Β» View Demo Β· Report Bug Β· Request Feature Table of Contents About The Pro

Grinding... 2 Dec 15, 2021