public static void check(final Activity activity) { AppRate.with(activity) .listener(new CountingOnShowListener(activity)) .retryPolicy(RetryPolicy.EXPONENTIAL) .view(R.layout.view_app_rate) .text(R.string.app_rate_rate_us) .initialLaunchCount(LAUNCHES_UNTIL_PROMPT) .minInterval(MIN_WAIT_BETWEEN_DISPLAYS) .debug(BuildConfig.DEBUG) .checkAndShow(); }
private void loadProfiles() { mCompleteProfiles = AeroActivity.shell.getDirInfo(FilePath.sharedPrefsPath, true); for (String s : mCompleteProfiles) { // Don't take default xml; if (!(s.equals("com.aero.control_preferences.xml") || s.equals("showcase_internal.xml") || s.equals("app_rate_prefs.xml") || s.equals(perAppProfileHandler + ".xml") || s.equals("miscSettingsStorage.xml"))) { // Just for the looks; s = s.replace(".xml", ""); addProfile(s, false); mContainerView.findViewById(android.R.id.empty).setVisibility(View.GONE); mContainerView.findViewById(R.id.empty_image).setVisibility(View.GONE); } } // If null, initiate the helper; if (AeroActivity.perAppService == null) AeroActivity.perAppService = new PerAppServiceHelper(mContext); // User has assigned apps, but no service is running; if (!(AeroActivity.perAppService.getState())) { if (checkAllStates() && !mWarning) { AppRate.with(getActivity()) .text(R.string.pref_profile_service_not_running) .fromTop(false) .delay(1000) .autoHide(15000) .allowPlayLink(false) .forceShow(); mWarning = true; } } }