当前位置: 首页>>代码示例>>Java>>正文


Java AppRate类代码示例

本文整理汇总了Java中hotchemi.android.rate.AppRate的典型用法代码示例。如果您正苦于以下问题:Java AppRate类的具体用法?Java AppRate怎么用?Java AppRate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AppRate类属于hotchemi.android.rate包,在下文中一共展示了AppRate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupRateApp

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
public void setupRateApp(){
    AppRate.with(this)
            .setInstallDays(0) // default 10, 0 means install day.
            .setLaunchTimes(3) // default 10
            .setRemindInterval(2) // default 1
            .setShowLaterButton(true) // default true
            .setDebug(false) // default false
            .setOnClickButtonListener(new OnClickButtonListener() { // callback listener.
                @Override
                public void onClickButton(int which) {
                    Log.d(MainActivity.class.getName(), Integer.toString(which));
                }
            })
            .monitor();

    // Show a dialog if meets conditions
    AppRate.showRateDialogIfMeetsConditions(this);
}
 
开发者ID:victoraldir,项目名称:BuddyBook,代码行数:19,代码来源:MainActivity.java

示例2: initAppRateDialog

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
private void initAppRateDialog() {
    AppRate.with(this)
            .setInstallDays(0) // default 10, 0 means install day.
            .setLaunchTimes(2) // default 10
            .setRemindInterval(2) // default 1
            .setShowLaterButton(true) // default true
            .setDebug(false) // default false
            .setOnClickButtonListener(new OnClickButtonListener() { // callback listener.
                @Override
                public void onClickButton(int which) {
                    Log.d(MainActivity.class.getName(), Integer.toString(which));
                }
            })
            .monitor();
    // Show a dialog if meets conditions
    AppRate.showRateDialogIfMeetsConditions(this);
}
 
开发者ID:CheetaTech,项目名称:ColorHub,代码行数:18,代码来源:MainActivity.java

示例3: rateApp

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
private void rateApp() {
    AppRate.with(this)
            .setInstallDays(1) // default 10, 0 means install day.
            .setLaunchTimes(5) // default 10
            .setRemindInterval(2) // default 1
            .setShowLaterButton(true) // default true
            .setOnClickButtonListener(new OnClickButtonListener() { // callback listener.
                @Override
                public void onClickButton(int which) {
                    MobclickAgent.onEvent(MainActivity.this, "rate_score_"+which);
                }
            })
            .monitor();

    // Show a dialog if meets conditions
    AppRate.showRateDialogIfMeetsConditions(this);
}
 
开发者ID:maoruibin,项目名称:AppPlus,代码行数:18,代码来源:MainActivity.java

示例4: AppRating

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
void AppRating(){
    AppRate.with(this)
            .setInstallDays(0) // default 10, 0 means install day.
            .setLaunchTimes(1) // default 10
            .setRemindInterval(1) // default 1
            .setShowLaterButton(true) // default true
            .setDebug(false) // default false
            .setOnClickButtonListener(new OnClickButtonListener() { // callback listener.
                @Override
                public void onClickButton(int which) {
                    Log.d(MainActivity.class.getName(), Integer.toString(which));
                }
            })
            .monitor();

    // Show a dialog if meets conditions
    AppRate.showRateDialogIfMeetsConditions(this);

    AppRate.with(this).clearAgreeShowDialog();
}
 
开发者ID:abhijith0505,项目名称:CarbonContacts,代码行数:21,代码来源:MainActivity.java

示例5: checkAppRate

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
public void checkAppRate() {
    AppRate.with(this)
            .setInstallDays(5) // default 10, 0 means install day.
            .setLaunchTimes(10) // default 10
            .setRemindInterval(2) // default 1
            .setShowNeutralButton(false) // default true
            .setDebug(false) // default false
            .setOnClickButtonListener(new OnClickButtonListener() { // callback listener.
                @Override
                public void onClickButton(int which) {
                    Log.d(MainPage.class.getName(), Integer.toString(which));
                }
            })
            .monitor();

    // Show a dialog if meets conditions
    AppRate.showRateDialogIfMeetsConditions(this);
}
 
开发者ID:pgodzin,项目名称:QuotesSocial,代码行数:19,代码来源:MainPage.java

示例6: onConnect

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
@Override
        public void onConnect(OneSheeldDevice device) {
            super.onConnect(device);
            ((OneSheeldApplication) activity.getApplication()).setConnectedDevice(device);
            if (activity.getThisApplication().getConnectedDevice() != null)
                activity.getThisApplication().getConnectedDevice().addVersionQueryCallback(activity.versionQueryCallback);
            Intent intent = new Intent(activity, OneSheeldService.class);
            intent.putExtra(ArduinoConnectivityPopup.EXTRA_DEVICE_NAME, device.getName());
            activity.startService(intent);
            getApplication().setConnectedDevice(device);
            activity.runOnUiThread(new Runnable() {
                @Override
                public void run() {

                    activity.getThisApplication().taskerController = new TaskerShield(
                            activity, UIShield.TASKER_SHIELD.name());
                    Log.e(TAG, "- ARDUINO CONNECTED -");
                    getApplication().getTracker()
                            .send(new HitBuilders.ScreenViewBuilder().setNewSession()
                                    .build());
                    getApplication()
                            .startConnectionTimer();
//                    if (isOneSheeldServiceRunning()) {
                    if (adapter != null)
                        adapter.applyToControllerTable();
//                    }
                    AppRate.showRateDialogIfMeetsConditions(activity);
                    activity.showMenuButtonTutorialOnce();

                }
            });
        }
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:33,代码来源:SheeldsList.java

示例7: setupGooglePlayRateIfNeeded

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
private void setupGooglePlayRateIfNeeded() {
    if (mFirebaseRemoteConfig.getBoolean(Constants.GOOGLE_PLAY_RATE_DIALOG_KEY)) {
        AppRate.with(this)
                .setInstallDays(1)
                .setLaunchTimes(3)
                .setShowLaterButton(true)
                .setDebug(false)
                .monitor();

        AppRate.showRateDialogIfMeetsConditions(this);
    }
}
 
开发者ID:Gnzlt,项目名称:UCOmove,代码行数:13,代码来源:MainActivity.java

示例8: onCreate

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    AppRate.with(this).setInstallDays(SSConstants.SS_APP_RATE_INSTALL_DAYS).monitor();
    AppRate.showRateDialogIfMeetsConditions(this);

    binding = DataBindingUtil.setContentView(this, R.layout.ss_lessons_activity);

    SSLessonsAdapter adapter = new SSLessonsAdapter();
    binding.ssLessonInfoList.setAdapter(adapter);
    binding.ssLessonInfoList.setLayoutManager(new LinearLayoutManager(this));

    setSupportActionBar(binding.ssLessonsAppBar.ssLessonsToolbar);

    ActionBar ssToolbar = getSupportActionBar();

    if (ssToolbar != null) {
        ssToolbar.setDisplayHomeAsUpEnabled(true);
    }

    binding.ssLessonsAppBar.ssLessonCollapsingToolbar.setCollapsedTitleTextAppearance(R.style.AppThemeAppBarTextStyle);
    binding.ssLessonsAppBar.ssLessonCollapsingToolbar.setExpandedTitleTextAppearance(R.style.AppThemeAppBarTextStyleExpanded);

    binding.ssLessonsAppBar.ssLessonCollapsingToolbar.setCollapsedTitleTypeface(Typeface.createFromAsset(getAssets(), "fonts/Lato-Bold.ttf"));
    binding.ssLessonsAppBar.ssLessonCollapsingToolbar.setExpandedTitleTypeface(Typeface.createFromAsset(getAssets(), "fonts/Lato-Bold.ttf"));

    ssLessonsViewModel = new SSLessonsViewModel(this, this, getIntent().getExtras().getString(SSConstants.SS_QUARTERLY_INDEX_EXTRA));
    binding.executePendingBindings();
    binding.setViewModel(ssLessonsViewModel);

    setUpDrawer();
}
 
开发者ID:Adventech,项目名称:sabbath-school-android,代码行数:34,代码来源:SSLessonsActivity.java

示例9: initializeAppRateDialog

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
public static void initializeAppRateDialog(Context context)
{
    AppRate.with(context)
            .setInstallDays(0) //number of days since install, default 10
            .setLaunchTimes(3) //number of minimum launches, default 10
            .setShowNeverButton(false)
            .setRemindInterval(2) //number of days since remind me later was clicked
            .monitor();
}
 
开发者ID:ManojMadanmohan,项目名称:dlt,代码行数:10,代码来源:Utilities.java

示例10: setAppropriateLayout

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
private void setAppropriateLayout()
{
    showDeepLinkRootView();

    if (Utilities.isAppTutorialSeen(this))
    {
        AppRate.showRateDialogIfMeetsConditions(this);
    } else
    {
        launchTutorial();
        Utilities.setAppTutorialSeen(DeepLinkHistoryActivity.this);
    }
}
 
开发者ID:ManojMadanmohan,项目名称:dlt,代码行数:14,代码来源:DeepLinkHistoryActivity.java

示例11: onPreferenceClick

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
@Override
    public boolean onPreferenceClick(android.preference.Preference preference) {
        String key = preference.getKey();
        //用if判断 效率不会很好 待改善
        if(key.equals(getString(R.string.preference_key_about))){
            String htmlFileName =  Utils.isChineseLanguage()?"about_ch.html":"about.html";
            DialogUtil.showCustomDialogFillInWebView(mContext, mContext.getSupportFragmentManager(), getString(R.string.preference_title_about), htmlFileName, "about");
            MobclickAgent.onEvent(mContext, "setting_about");
        }
        if(key.equals(getString(R.string.preference_key_score))){
//            NavigationManager.gotoMarket(mContext,getActivity().getPackageName());
            AppRate.with(getActivity()).showRateDialog(getActivity());
            MobclickAgent.onEvent(mContext, "setting_market");
        }
        if(key.equals(getString(R.string.preference_key_opinion))){
            NavigationManager.gotoSendOpinion(getActivity());
            MobclickAgent.onEvent(getActivity(), "send_email");
        }
        if(key.equals(getString(R.string.preference_key_check_update))){
            UmengUpdateAgent.setUpdateListener(new CheckUmengUpdateListener());
            UmengUpdateAgent.forceUpdate(mContext);
            MobclickAgent.onEvent(mContext, "setting_check_update");
        }
        if(key.equals(getString(R.string.preference_key_license))){
            DialogUtil.showCustomDialogFillInWebView(mContext, mContext.getSupportFragmentManager(), getString(R.string.preference_title_license), "license.html", "license");
            MobclickAgent.onEvent(mContext, "setting_license");
        }
        return false;
    }
 
开发者ID:maoruibin,项目名称:AppPlus,代码行数:30,代码来源:AboutFragment.java

示例12: onResumeFragments

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
@Override
protected void onResumeFragments() {
    super.onResumeFragments();
    setSwitchImageState();

    isReflectionOK = mSharedPrefs.getBoolean(Constants.PREFS_REFLECT_STATUS, false);
    if (isReflectionOK) {
        //Config for rating recomendation, Only show dialog when reflection ok
        AppRate.getInstance().setInstallDays(2).setLaunchTimes(5).monitor(this);
        AppRate.showRateDialogIfMeetsConditions(this);
    }
}
 
开发者ID:hoang8f,项目名称:AutoAP,代码行数:13,代码来源:MainActivity.java

示例13: onCreate

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    AppRate.with(this)
            .setStoreType(StoreType.GOOGLEPLAY) //default is Google, other option is Amazon
            .setInstallDays(3) // default 10, 0 means install day.
            .setLaunchTimes(10) // default 10 times.
            .setRemindInterval(2) // default 1 day.
            .setShowLaterButton(true) // default true.
            .setDebug(true) // default false.
            .setCancelable(false) // default false.
            .setOnClickButtonListener(new OnClickButtonListener() { // callback listener.
                @Override
                public void onClickButton(int which) {
                    Log.d(MainActivity.class.getName(), Integer.toString(which));
                }
            })
            .setTitle(R.string.new_rate_dialog_title)
            .setTextLater(R.string.new_rate_dialog_later)
            .setTextNever(R.string.new_rate_dialog_never)
            .setTextRateNow(R.string.new_rate_dialog_ok)
            .monitor();

    AppRate.showRateDialogIfMeetsConditions(this);
}
 
开发者ID:hotchemi,项目名称:Android-Rate,代码行数:28,代码来源:MainActivity.java

示例14: onCreate

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().setBackgroundDrawable(null);
    setContentView(R.layout.activity_main);

    //Toolbar
    toolbar = (Toolbar) findViewById(R.id.toolbar_main);

    int startedFrom = getIntent().getIntExtra(ActivityPlayer.ACTIVITY_STARTED_FROM, -1);

    if (isFirstRun && !Arrays.asList(notificationsActions).contains(startedFrom)) {
        toolbar.setVisibility(View.GONE);
        final FragmentWellcome fragmentWellcome = new FragmentWellcome();
        showFragment(R.id.fl_window, fragmentWellcome, FragmentWellcome.TAG);
        init();
        new Handler().postDelayed(new Runnable() {
            public void run() {
                hideFragment(fragmentWellcome);
                if (!Prefs.getBoolean(FragmentHelp.PREF_HELP_SHOWN, false)) { //!
                    showHelpFragment();
                } else {
                    toolbar.setVisibility(View.VISIBLE);
                    showFragment(R.id.fl_content, getStartFragment(), FragmentMediaItemsGrid.TAG);
                }
            }
        }, WELLCOME_SCREEN_TIME);
    } else {
        init();
        toolbar.setVisibility(View.VISIBLE);

        int startedFragmentNumber = ActivityMain.lastChildFragmentNumber;

        if (startedFrom == NetworkTasksService.NOTIFICATIONS_SHOW_PODCASTS_SUBSCRIBED) {
            startedFragmentNumber = 1;
            startedFrom = MediaItemType.PODCAST.ordinal();
            NotificationManager nMgr = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
            nMgr.cancel(NetworkTasksService.NEW_EPISODS_NOTIFICATION_ID);
        }

        FragmentMediaItemsGrid fragmentMediaItemsGrid = new FragmentMediaItemsGrid();
        fragmentMediaItemsGrid.setMediaItemType(startedFrom == MediaItemType.PODCAST.ordinal() ? MediaItemType.PODCAST : MediaItemType.RADIO);
        if (startedFragmentNumber >= 0) {
            fragmentMediaItemsGrid.setStartItemNumber(startedFragmentNumber);
        }
        showFragment(R.id.fl_content, fragmentMediaItemsGrid, FragmentMediaItemsGrid.TAG);
        AppRate.with(this)
                .setInstallDays(RATE_MIN_INSTALL_DAYS)
                .setLaunchTimes(RATE_MIN_INSTALL_TIMES)
                .setShowLaterButton(true) // default true
                .monitor();

        // Show a dialog if meets conditions
        AppRate.showRateDialogIfMeetsConditions(this);
    }
    isFirstRun = false;
}
 
开发者ID:KKorvin,项目名称:uPods-android,代码行数:58,代码来源:ActivityMain.java

示例15: onCreate

import hotchemi.android.rate.AppRate; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Utils.onActivityCreateSetTheme(this);
    setContentView(R.layout.activity_main);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    if (!EROWID_DB.isChemIndexLoaded()) mFetchChemIndexTask.execute(ErowidDB.Index.CHEMICALS.toString());
    if (!EROWID_DB.isPlantIndexLoaded()) mFetchPlantIndexTask.execute(ErowidDB.Index.PLANTS.toString());
    if (!EROWID_DB.isHerbIndexLoaded()) mFetchHerbIndexTask.execute(ErowidDB.Index.HERBS.toString());
    if (!EROWID_DB.isPharmIndexLoaded()) mFetchPharmIndexTask.execute(ErowidDB.Index.PHARMS.toString());
    if (!EROWID_DB.isSmartIndexLoaded()) mFetchSmartIndexTask.execute(ErowidDB.Index.SMARTS.toString());
    if (!EROWID_DB.isAnimalIndexLoaded()) mFetchAnimalIndexTask.execute(ErowidDB.Index.ANIMALS.toString());
    if (!EROWID_DB.isVaultIndexLoaded()) mFetchVaultIndexTask.execute(ErowidDB.Index.VAULT.toString());

    // Calls the "Rate this app library"
    AppRate.with(this)
            .setInstallDays(5)
            .setLaunchTimes(5)
            .setRemindInterval(2)
            .setShowLaterButton(true)
            .setDebug(false)
            .setOnClickButtonListener(new OnClickButtonListener() { // callback listener.
                @Override
                public void onClickButton(int which) {
                    Log.d(MainActivity.class.getName(), Integer.toString(which));
                }
            })
            .monitor();
    AppRate.showRateDialogIfMeetsConditions(this);

    mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
            this, mDrawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    mDrawerLayout.setDrawerListener(toggle);
    toggle.syncState();

    NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
    navigationView.setNavigationItemSelectedListener(this);

    Fragment fragment = HomeFragment.newInstance();
    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
    ft.replace(R.id.fragment_container, fragment);
    ft.commit();
}
 
开发者ID:melancholiclabs,项目名称:ElegantErowid,代码行数:47,代码来源:MainActivity.java


注:本文中的hotchemi.android.rate.AppRate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。