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


Java RateThisApp类代码示例

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


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

示例1: onStart

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
@Override
protected void onStart() {
    super.onStart();
    // Monitor launch times and interval from installation
    mGoogleApiClient.connect();

    RateThisApp.onStart(this);
    RateThisApp.Config config = new RateThisApp.Config(10, 10);
    // Custom title ,message and buttons names
    config.setTitle(R.string.rate_app_title);
    config.setMessage(R.string.rate_app_message);
    config.setYesButtonText(R.string.rate);
    config.setNoButtonText(R.string.no_rate);
    config.setCancelButtonText(R.string.rate_cancel);
    RateThisApp.init(config);

    // If the criteria is satisfied, "Rate this app" dialog will be shown
    RateThisApp.showRateDialogIfNeeded(this);
}
 
开发者ID:robertsimoes,项目名称:Flow,代码行数:20,代码来源:TheHubActivity.java

示例2: onStart

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
@Override
protected void onStart() {
    super.onStart();
    if (mPreferences != null)
        mPreferences.registerOnSharedPreferenceChangeListener(this);
    // Monitor launch times and interval from installation
    RateThisApp.onStart(this);
    // If the criteria is satisfied, "Rate this app" dialog will be shown
    RateThisApp.showRateDialogIfNeeded(this);
    RateThisApp.setCallback(new RateThisApp.Callback() {
        @Override
        public void onYesClicked() {
            rateApp(null);
        }

        @Override
        public void onNoClicked() {
        }

        @Override
        public void onCancelClicked() {
        }
    });

}
 
开发者ID:tranleduy2000,项目名称:sortalgorithm,代码行数:26,代码来源:AbstractAppCompatActivity.java

示例3: onCreate

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    MainActivity.instance = this;
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);

    setSupportActionBar(toolbar);
    if(getSupportActionBar() != null) {
        getSupportActionBar().setDisplayShowTitleEnabled(false);
    }

    init();
    initBilling();

    RateThisApp.onStart(this);
    RateThisApp.showRateDialogIfNeeded(this);
}
 
开发者ID:adrielcafe,项目名称:NMSAlphabetAndroidApp,代码行数:19,代码来源:MainActivity.java

示例4: onStart

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
@Override
    protected void onStart() {
        super.onStart();
        // Monitor launch times and interval from installation
//        mGoogleApiClient.connect();

        RateThisApp.onStart(this);
        RateThisApp.Config config = new RateThisApp.Config(10, 10);
        // Custom title ,message and buttons names
        config.setTitle(R.string.rate_app_title);
        config.setMessage(R.string.rate_app_message);
        config.setYesButtonText(R.string.rate);
        config.setNoButtonText(R.string.no_rate);
        config.setCancelButtonText(R.string.rate_cancel);
        RateThisApp.init(config);

        // If the criteria is satisfied, "Rate this app" dialog will be shown
        RateThisApp.showRateDialogIfNeeded(this);
        // ATTENTION: This was auto-generated to implement the App Indexing API.
        // See https://g.co/AppIndexing/AndroidStudio for more information.
//        AppIndex.AppIndexApi.start(mGoogleApiClient, getIndexApiAction());
    }
 
开发者ID:tortuvshin,项目名称:yield,代码行数:23,代码来源:TheHubActivity.java

示例5: rateThisApp

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
/**
 * App rating init
 */
static void rateThisApp(Context context) {
    // Monitor launch times and interval from installation
    RateThisApp.onStart(context);
    // If the criteria is satisfied, "Rate this app" dialog will be shown
    RateThisApp.showRateDialogIfNeeded(context);
}
 
开发者ID:jamesddube,项目名称:LaravelNewsApp,代码行数:10,代码来源:App.java

示例6: showDialogRate

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
private void showDialogRate() {
    // Monitor launch times and interval from installation
    RateThisApp.onCreate(this);
    // If the criteria is satisfied, "Rate this app" dialog will be shown
    boolean showed = RateThisApp.showRateDialogIfNeeded(this);
    int launchCount = RateThisApp.getLaunchCount(this);
    if (Premium.isFree(this) && !showed && launchCount % 10 == 0) {
        Premium.upgrade(this);
    }
}
 
开发者ID:tranleduy2000,项目名称:text_converter,代码行数:11,代码来源:MainActivity.java

示例7: init

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
public static void init(Context context) {
    RateThisApp.Config config = new RateThisApp.Config(3, 15);
    config.setTitle(R.string.my_own_title);
    config.setMessage(R.string.my_own_message);
    config.setYesButtonText(R.string.my_own_rate);
    config.setNoButtonText(R.string.my_own_thanks);
    config.setCancelButtonText(R.string.my_own_cancel);
    RateThisApp.init(config);
}
 
开发者ID:tranleduy2000,项目名称:sortalgorithm,代码行数:10,代码来源:RateManager.java

示例8: initRateSystem

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
public void initRateSystem() {
    // Custom condition: 2 days and 5 launches
    RateThisApp.Config configr = new RateThisApp.Config(2, 5);
    RateThisApp.init(configr);
    RateThisApp.onCreate(this);
    RateThisApp.showRateDialogIfNeeded(this);
}
 
开发者ID:Light-Team,项目名称:ModPE-IDE-Source,代码行数:8,代码来源:LModActivity.java

示例9: attachBaseContext

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
@Override
protected void attachBaseContext(Context context) {
    super.attachBaseContext(context);
    MultiDex.install(this);
    sContext = context;
    RateThisApp.Config config = new RateThisApp.Config(3, 10);
    RateThisApp.init(config);
}
 
开发者ID:DmitryMalkovich,项目名称:gito-github-client,代码行数:9,代码来源:GitoApplication.java

示例10: onStart

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
@Override
protected void onStart() {
    super.onStart();
    // Monitor launch times and interval from installation
    RateThisApp.onStart(this);
    // If the criteria is satisfied, "Rate this app" dialog will be shown
    RateThisApp.showRateDialogIfNeeded(this);
}
 
开发者ID:DmitryMalkovich,项目名称:gito-github-client,代码行数:9,代码来源:NavigationViewActivity.java

示例11: onCreate

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_cozy);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

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

    navigationView = (NavigationView) findViewById(R.id.nav_view);
    navigationView.setNavigationItemSelectedListener(this);
    header = navigationView.getHeaderView(0);
    txtDeviceUrl = (TextView) header.findViewById(R.id.txtDeviceUrl);
    txtDeviceUrl.setText(Device.registeredDevice().getUrl());

    FragmentManager fragmentManager = getSupportFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    currentFragment = new MainFragment();
    fragmentTransaction.add(R.id.container, currentFragment);
    fragmentTransaction.commit();

    RateThisApp.Config config = new RateThisApp.Config(3, 5);
    config.setTitle(R.string.lbl_rate_me_title);
    config.setMessage(R.string.lbl_rate_me_message);
    config.setYesButtonText(R.string.YES);
    config.setNoButtonText(R.string.NO);
    config.setCancelButtonText(R.string.CANCEL);
    RateThisApp.init(config);
    // Monitor launch times and interval from installation
    RateThisApp.onStart(this);
    // If the criteria is satisfied, "Rate this app" dialog will be shown
    RateThisApp.showRateDialogIfNeeded(this);
}
 
开发者ID:hamzux,项目名称:cosi,代码行数:38,代码来源:CozyActivity.java

示例12: onCreate

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    setTransition();
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_moonlight);

    mLock = SPUtils.getInt(MoonlightApplication.getContext(), Constants.USER_CONFIG, Constants.USER_CONFIG_SECURITY_ENABLE, 0);
    if (mLock != 0) {
        isLock = true;
    }

    mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
    mFirebaseUser = FirebaseAuth.getInstance().getCurrentUser();
    mAuth = getInstance();
    //noinspection ConstantConditions
    mUserId = mAuth.getCurrentUser().getUid();
    mFDatabaseUtils = FDatabaseUtils.newInstance(MoonlightApplication.getContext(), mUserId);
    mFDatabaseUtils.getDataFromDatabase(null, Constants.EXTRA_TYPE_USER);
    EventBus.getDefault().register(this);
    initView();
    displayUserInfo();
    RateThisApp.setCallback(new RateThisApp.Callback() {
        @Override
        public void onYesClicked() {
            isRateMyApp(mUserId, "Awesome, this guy rates my app!", true);
        }

        @Override
        public void onNoClicked() {
            isRateMyApp(mUserId, "emmmm, My app is not good enough and I need to improve it", false);
        }

        @Override
        public void onCancelClicked() {
            isRateMyApp(mUserId, "emmmm, My app is not good enough and I need to improve it", false);
        }
    });

}
 
开发者ID:Art2Cat,项目名称:MoonlightNote,代码行数:40,代码来源:MoonlightActivity.java

示例13: rateThisAppInit

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
/**
 * «Rate this app» dialog initialization
 */
private void rateThisAppInit(Context context) {
    RateThisApp.onCreate(context);
    RateThisApp.Config config = new RateThisApp.Config(INSTALL_DAYS, LAUNCH_TIMES);
    RateThisApp.init(config);
    RateThisApp.showRateDialogIfNeeded(context);
}
 
开发者ID:Djonique,项目名称:Birdays,代码行数:10,代码来源:DetailActivity.java

示例14: onCreate

import com.kobakei.ratethisapp.RateThisApp; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().requestFeature(Window.FEATURE_PROGRESS);
    setContentView(R.layout.activity_main);
    getWindow().setFeatureInt( Window.FEATURE_PROGRESS, Window.PROGRESS_VISIBILITY_ON);
    toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    viewPager = (ViewPager) findViewById(R.id.viewpager);
    viewPager.setOffscreenPageLimit(3);
    viewPager.setAdapter(new ViewPagerAdapter(getSupportFragmentManager()));
    setupViewPager(viewPager);
    tabLayout = (TabLayout) findViewById(R.id.tabs);
    tabLayout.setupWithViewPager(viewPager);
    setupTabIcons();

    // Monitor launch times and interval from installation
    // Custom condition: 3 days and 5 launches
    RateThisApp.Config config = new RateThisApp.Config(3, 5);
    RateThisApp.init(config);
    RateThisApp.onCreate(this);
    // If the condition is satisfied, "Rate this app" dialog will be shown
    RateThisApp.showRateDialogIfNeeded(MainActivity.this, R.style.MyAlertDialogStyle2);

    RateThisApp.setCallback(new RateThisApp.Callback() {
        @Override
        public void onYesClicked() {
            RateThisApp.stopRateDialog(getApplicationContext());
        }

        @Override
        public void onNoClicked() {
            RateThisApp.stopRateDialog(getApplicationContext());
        }

        @Override
        public void onCancelClicked() {
        }
    });


}
 
开发者ID:adarshgumashta,项目名称:Facebook-Video-Downloader,代码行数:43,代码来源:MainActivity.java


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