congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RateThisApp
Code IndexAdd Tabnine to your IDE (free)

How to use
RateThisApp
in
com.kobakei.ratethisapp

Best Java code snippets using com.kobakei.ratethisapp.RateThisApp (Showing top 15 results out of 315)

origin: kobakei/Android-RateThisApp

/**
 * This API is deprecated.
 * You should call onCreate instead of this API in Activity's onCreate().
 * @param context
 */
@Deprecated
public static void onStart(Context context) {
  onCreate(context);
}
origin: kobakei/Android-RateThisApp

/**
 * Show the rate dialog if the criteria is satisfied.
 * @param context Context
 * @return true if shown, false otherwise.
 */
public static boolean showRateDialogIfNeeded(final Context context) {
  if (shouldShowRateDialog()) {
    showRateDialog(context);
    return true;
  } else {
    return false;
  }
}
origin: kobakei/Android-RateThisApp

  @Override
  public void onClick(View v) {
    RateThisApp.stopRateDialog(MainActivity.this);
  }
});
origin: kobakei/Android-RateThisApp

RateThisApp.init(new RateThisApp.Config(3, 5));
RateThisApp.setCallback(new RateThisApp.Callback() {
  @Override
  public void onYesClicked() {
RateThisApp.onCreate(this);
RateThisApp.showRateDialogIfNeeded(this);
origin: JavaCafe01/PdfViewer

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  prefManager = PreferenceManager.getDefaultSharedPreferences(this);
  onFirstInstall();
  onFirstUpdate();
  handleIntent(getIntent());
  if (Utils.tempBool && getIntent().getStringExtra("uri") != null)
    uri = Uri.parse(getIntent().getStringExtra("uri"));
  // Custom condition: 5 days and 5 launches
  RateThisApp.Config config = new RateThisApp.Config(5, 5);
  RateThisApp.init(config);
  RateThisApp.onCreate(this);
  RateThisApp.showRateDialogIfNeeded(this);
}
origin: Somethingweirdhere/Secure-Photo-Viewer

RateThisApp.onCreate(this);
RateThisApp.showRateDialogIfNeeded(this);
origin: kobakei/Android-RateThisApp

@Test
public void shouldRateDialogIfNeeded_LaunchTimeIsCorrect() {
  Context context = RuntimeEnvironment.application.getApplicationContext();
  RateThisApp.init(new RateThisApp.Config(1, 3));
  RateThisApp.onStart(context);
  Assert.assertFalse(RateThisApp.shouldShowRateDialog());
  RateThisApp.onStart(context);
  Assert.assertFalse(RateThisApp.shouldShowRateDialog());
  RateThisApp.onStart(context);
  Assert.assertTrue(RateThisApp.shouldShowRateDialog());
  RateThisApp.onStart(context);
  Assert.assertTrue(RateThisApp.shouldShowRateDialog());
}
origin: kobakei/Android-RateThisApp

  @Override
  public void onClick(View v) {
    // Show rating dialog explicitly.
    RateThisApp.showRateDialog(MainActivity.this);
  }
});
origin: jorgegil96/All-NBA

RateThisApp.onCreate(this);
RateThisApp.showRateDialogIfNeeded(this);
origin: kobakei/Android-RateThisApp

  @Override
  public void onClick(View v) {
    // Show rating dialog explicitly.
    RateThisApp.showRateDialog(MainActivity.this, R.style.MyAlertDialogStyle2);
  }
});
origin: kobakei/Android-RateThisApp

/**
 * Show the rate dialog if the criteria is satisfied.
 * @param context Context
 * @param themeId Theme ID
 * @return true if shown, false otherwise.
 */
public static boolean showRateDialogIfNeeded(final Context context, int themeId) {
  if (shouldShowRateDialog()) {
    showRateDialog(context, themeId);
    return true;
  } else {
    return false;
  }
}
origin: kobakei/Android-RateThisApp

/**
 * Show the rate dialog
 * @param context
 * @param themeId
 */
public static void showRateDialog(final Context context, int themeId) {
  AlertDialog.Builder builder = new AlertDialog.Builder(context, themeId);
  showRateDialog(context, builder);
}
origin: kobakei/Android-RateThisApp

  @Test
  public void stopRateDialog_IsSuccess() {
    Context context = RuntimeEnvironment.application.getApplicationContext();
    RateThisApp.stopRateDialog(context);

    // check shared pref
    SharedPreferences sharedPreferences = RuntimeEnvironment.application.getSharedPreferences(
        PREF_NAME, Context.MODE_PRIVATE);
    Assert.assertTrue(sharedPreferences.getBoolean(KEY_OPT_OUT, false));
  }
}
origin: kobakei/Android-RateThisApp

/**
 * Show the rate dialog
 * @param context
 */
public static void showRateDialog(final Context context) {
  AlertDialog.Builder builder = new AlertDialog.Builder(context);
  showRateDialog(context, builder);
}
origin: jorgegil96/All-NBA

  RateThisApp.showRateDialog(getActivity());
  return true;
});
com.kobakei.ratethisappRateThisApp

Javadoc

RateThisApp
A library to show the app rate dialog

Most used methods

  • onCreate
    Call this API when the launcher activity is launched. It is better to call this API in onCreate() of
  • showRateDialogIfNeeded
    Show the rate dialog if the criteria is satisfied.
  • init
    Initialize RateThisApp configuration.
  • showRateDialog
  • shouldShowRateDialog
    Check whether the rate dialog should be shown or not. Developers may call this method directly if th
  • stopRateDialog
    Stop showing the rate dialog
  • getLaunchCount
    Get count number of the rate dialog launches
  • log
    Print log if enabled
  • onStart
    This API is deprecated. You should call onCreate instead of this API in Activity's onCreate().
  • printStatus
    Print values in SharedPreferences (used for debug)
  • setCallback
    Set callback instance. The callback will receive yes/no/later events.
  • setOptOut
    Set opt out flag. If it is true, the rate dialog will never shown unless app data is cleared. This m
  • setCallback,
  • setOptOut,
  • storeInstallDate

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • setScale (BigDecimal)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • ImageIO (javax.imageio)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now