Tool for Android app development

Overview

RateMeMaybe

  • Asks the user if (s)he wants to open the Play Store to rate your application when certain requirements are met (see below). This can and should be configured to be very cautious. Don't annoy your users!
  • Dialog icon, title, message and so on can be easily customized
  • The sample Activity uses SherlockFragmentActivity (from ActionBarSherlock), but you can use a normal FragmentActivity if you do not use ABS. If you also do not use the android support library, you can change mActivity.getSupportFragmentManager() to mActivity.getFragmentManager()
  • Code is heavily based on AppRate by Timothee Jeannin
  • License: MIT

To use it, you can simply copy RateMeMaybe.java and RateMeMaybeFragment.java into your project.

Example usage in your (Sherlock)FragmentActivity:

RateMeMaybe rmm = new RateMeMaybe(this);
rmm.setPromptMinimums(10, 14, 10, 30);
rmm.run();

// More customized example
RateMeMaybe rmm = new RateMeMaybe(this);
rmm.setPromptMinimums(10, 14, 10, 30);
rmm.setDialogMessage("You really seem to like this app, "
				+"since you have already used it %totalLaunchCount% times! "
				+"It would be great if you took a moment to rate it.");
rmm.setDialogTitle("Rate this app");
rmm.setPositiveBtn("Yeeha!");
rmm.run();

Methods:

	/**
	 * Sets requirements for when to prompt the user.
	 * 
	 * @param minLaunchesUntilInitialPrompt
	 *            Minimum of launches before the user is prompted for the first
	 *            time. One call of .run() counts as launch.
	 * @param minDaysUntilInitialPrompt
	 *            Minimum of days before the user is prompted for the first
	 *            time.
	 * @param minLaunchesUntilNextPrompt
	 *            Minimum of launches before the user is prompted for each next
	 *            time. One call of .run() counts as launch.
	 * @param minDaysUntilNextPrompt
	 *            Minimum of days before the user is prompted for each next
	 *            time.
	 */
	public void setPromptMinimums(int minLaunchesUntilInitialPrompt,
			int minDaysUntilInitialPrompt, int minLaunchesUntilNextPrompt,
			int minDaysUntilNextPrompt)
	/**
	 * Sets the title of the dialog shown to the user
	 * @param dialogTitle
	 */
	public void setDialogTitle(String dialogTitle)

	/**
	 * Sets the message shown to the user. %totalLaunchCount% will be replaced
	 * with total launch count.
	 * 
	 * @param dialogMessage
	 *            The message shown
	 */
	public void setDialogMessage(String dialogMessage)

	/**
	 * Sets name of button that opens Play Store entry
	 * 
	 * @param positiveBtn
	 */
	public void setPositiveBtn(String positiveBtn)

	/**
	 * Sets name of neutral button
	 * 
	 * @param neutralBtn
	 */
	public void setNeutralBtn(String neutralBtn)

	/**
	 * Sets name of button that makes the prompt never show again
	 * 
	 * @param negativeBtn
	 */
	public void setNegativeBtn(String negativeBtn)

	/**
	 * @param customIcon
	 *            Drawable id of custom icon
	 */
	public void setIcon(int customIcon)

	/**
	 * @param handleCancelAsNeutral
	 *            Standard is true. If set to false, a back press (or other
	 *            things that lead to the dialog being cancelled), will be
	 *            handled like a negative choice (click on "Never").
	 */
	public void setHandleCancelAsNeutral(Boolean handleCancelAsNeutral)
	
	/**
	 * Sets an additional callback for when the user has made a choice.
	 * @param listener
	 */
	public void setAdditionalListener(OnRMMUserChoiceListener listener)
	
	/**
	 * Standard is false. Whether the run method is executed even if no Play
	 * Store is installed on device.
	 * 
	 * @param runWithoutPlayStore
	 */
	public void setRunWithoutPlayStore(Boolean runWithoutPlayStore)

	/**
	 * Reset the launch logs
	 */
	public static void resetData(FragmentActivity activity)

	/**
	 * Forces the dialog to show, even if the requirements are not yet met. Does
	 * not affect prompt logs. Use with care.
	 */
	public void forceShow()
You might also like...
The Android Version in Kotlin of The Dialer App (in SwiftUI)

Dialer An intuitive USSD client to handle most of the common actions for you. Contains common MTN Rwanda USSD activation codes, which drastically simp

Experimental optical character recognition app
Experimental optical character recognition app

android-ocr An experimental app for Android that performs optical character recognition (OCR) on images captured using the device camera. Runs the Tes

I was fed up with writing Java classes to mirror json models. So I wrote this Java app to automate the process.

Json2Java I was fed up with writing Java classes to mirror json models. So I wrote this Java app to automate the process. What this tool can do right

基于Appium的 App UI 遍历 & Monkey工具 (支持操作步骤回放)
基于Appium的 App UI 遍历 & Monkey工具 (支持操作步骤回放)

UICrawler 基于Appium的App UI遍历 & Monkey 工具 针对个人和公司提供有偿UI自动化技术、接口自动化技术、接口mock技术等培训及测试工具定制开发 QQ 技术交流群 : 728183683 环境搭建及基本使用说明 环境搭建(感谢网友harsayer倾力之作): https

Makes Google play in app purchase library (BillingClient) into a flowable that can easily be used in compose world

Billy the android Our goal is to make a modern api of BillingClient so that it is easier to use in compose world. This library is still early beta and

Extension for Voisek App on React Native

react-native-voisek-app-extension Voisek App Extension for React Native Installation npm install react-native-voisek-app-extension Usage import Voisek

Brief description of the app architecture
Brief description of the app architecture

Readme App Brief description of the app architecture The application has a simple MVVM architecture based on a single Activity coupled with his own Vi

Recruitment Task App - record time which a user spends on tasks defined by himself

Recruitment-Task The purpose of this application is to record time which a user spends on tasks defined by himself. The user can add new tasks. New ta

Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.
Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

Comments
  • Problem with show(FragmentManager, String) in RateMeMaybe.java

    Problem with show(FragmentManager, String) in RateMeMaybe.java

    Getting a build error in RateMeMaybe.java:232

    frag.show(mActivity.getSupportFragmentManager(), "rmmFragment");
    

    Error reads, "The method show(FragmentManager, String) in the type DialogFragment is not applicable for the arguments (FragmentManager, String)"

    I believe this is because the method is:

    show(android.app.FragmentManager, String)
    

    instead of:

    show(android.support.v4.app.FragmentManager, String)
    

    I'm using

    <uses-sdk
            android:minSdkVersion="9"
            android:targetSdkVersion="16" />
    
    opened by omgitsbillryan 3
  • NullPointerException RateMeMaybeFragment.onCancel()

    NullPointerException RateMeMaybeFragment.onCancel()

    java.lang.NullPointerException at com.kopfgeldjaeger.ratememaybe.RateMeMaybeFragment.onCancel(RateMeMaybeFragment.java:74) at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1249) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5196) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) at dalvik.system.NativeStart.main(Native Method)

    opened by shkschneider 0
Owner
Nicolai Spohrer
Software Engineer - C++, Python, Linux, and whatever comes along
Nicolai Spohrer
transai is a localization tool on Android and iOS.

transai transai is a command line tool to help you do Android and iOS translation management. You can extract string files to csv format, or generate

Jintin 56 Nov 12, 2022
An unofficial migration requirements checking tool for University of Tsukuba - School of Comprehension Studies faculty.

scs-migration-checker (English) An unofficial migration requirements checking tool for University of Tsukuba - School of Comprehension Studies faculty

Itsu 4 Mar 25, 2022
The BitbucketWatcher is a helpful tool to keep up to date with updates on your repo.

The BitbucketWatcher is a helpful tool to keep up to date with updates on your repo. The Watcher tracks new PullRequests, status changes on code reviews, merged branches and forgotten branches.

null 4 Jan 10, 2022
An auto IBCS API response status checking tool which test tax, address and account module

IB IBCS API Test Tool An auto IBCS API response status checking tool which test tax, address and account module. Getting Started Cd to the cloned dire

Gabriel Liu 0 Oct 15, 2021
Android App development internship project to create woman home screen for clothing company The Swastika.

Android App development internship project to create woman home screen for clothing company The Swastika.

Shradha Suryawanshi 2 Jun 12, 2022
Android development recommendation for outdated libraries and current libraries preferred as of 2021

GADS21-Android-Recomendation-For currently used libraries and dependencies Android development recommendation for outdated libraries and current libra

Timz Owen 6 Nov 22, 2021
BTW-gradle is a development environment for the Better Than Wolves mod

BTW-gradle BTW-gradle is a development environment for the Better Than Wolves mod Quick Start Download the example Change settings.gradle and build.gr

Better Than Wolves Community 2 Feb 24, 2022
A plug and play ;) android library for displaying a "rate this app" dialog

Easy Rating Dialog This lib provides a simple way to display an alert dialog for rating app. Default conditions to show: User opened the app more than

Fernando Martínez 111 Dec 30, 2022
Android library that manages your app's cached data with ease.

Teller Android library that makes your apps faster. Teller facilitates the downloading, saving, and reading of the cached data of your app. Keep your

Levi Bostian 14 Apr 2, 2022
Demonstration of calling requestFocusFromTouch() in WebView is changing colors in Android app

webview-changing-colors-bug Demonstration of calling requestFocusFromTouch() in WebView is changing colors in Android app This is the problematic code

Konstantin Tabere 0 Oct 15, 2021