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

How to use
storeInstallDate
method
in
com.kobakei.ratethisapp.RateThisApp

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

origin: kobakei/Android-RateThisApp

/**
 * Call this API when the launcher activity is launched.<br>
 * It is better to call this API in onCreate() of the launcher activity.
 * @param context Context
 */
public static void onCreate(Context context) {
  SharedPreferences pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
  Editor editor = pref.edit();
  // If it is the first launch, save the date in shared preference.
  if (pref.getLong(KEY_INSTALL_DATE, 0) == 0L) {
    storeInstallDate(context, editor);
  }
  // Increment launch times
  int launchTimes = pref.getInt(KEY_LAUNCH_TIMES, 0);
  launchTimes++;
  editor.putInt(KEY_LAUNCH_TIMES, launchTimes);
  log("Launch times; " + launchTimes);
  editor.apply();
  mInstallDate = new Date(pref.getLong(KEY_INSTALL_DATE, 0));
  mLaunchTimes = pref.getInt(KEY_LAUNCH_TIMES, 0);
  mOptOut = pref.getBoolean(KEY_OPT_OUT, false);
  mAskLaterDate = new Date(pref.getLong(KEY_ASK_LATER_DATE, 0));
  printStatus(context);
}
com.kobakei.ratethisappRateThisAppstoreInstallDate

Javadoc

Store install date. Install date is retrieved from package manager if possible.

Popular methods of RateThisApp

  • 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

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JFileChooser (javax.swing)
  • JOptionPane (javax.swing)
  • Top plugins for Android Studio
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