RateMeMaybe


Source link: https://github.com/nspo/RateMeMaybe

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 [ActionBarSherlock]: http://actionbarsherlock.com [AppRate]: https://github.com/TimotheeJeannin/AppRate

To use it, you can simply copy [RateMeMaybe.java] and [RateMeMaybeFragment.java] into your project. [RateMeMaybe.java]: https://github.com/Kopfgeldjaeger/RateMeMaybe/blob/master/code/src/com/kopfgeldjaeger/ratememaybe/RateMeMaybe.java [RateMeMaybeFragment.java]: https://github.com/Kopfgeldjaeger/RateMeMaybe/blob/master/code/src/com/kopfgeldjaeger/ratememaybe/RateMeMaybeFragment.java

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()

Resources

A fast dependency injector for Android and Java. Kinject has been thought to get the following objectives:

  • Ease to configure.
  • Clean way to satisfy dependencies.
  • High performance without lose flexibility.
  • Integration little intrusive and easily abstractable.
  • Dependencies graph validation in compilation time.
  • Based on code generation.
  • Proguard friendly.

This library provides support to generate Google Material Design colored lists.

PaceholderJ is a simple Android library created to help you handle easily with screens of empty list, no items found, loading and error.

Shade Melange is a library that contains a colour palette with a wide range of pre-defined colours with their names. The implementation of the grid has been done using RecyclerView for memory efficient performance.

ChroMATERIAL is a color scheme that expresses the chromatic nature of Material Design within JetBrain IDEs and Android Studio. In particular, ChroMATERIAL focuses on syntax highlighting of code within the IDE's code editor.

Specter is an easy way to convert a payload data to pojo class.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes