本文整理汇总了Java中com.kobakei.ratethisapp.RateThisApp.showRateDialogIfNeeded方法的典型用法代码示例。如果您正苦于以下问题:Java RateThisApp.showRateDialogIfNeeded方法的具体用法?Java RateThisApp.showRateDialogIfNeeded怎么用?Java RateThisApp.showRateDialogIfNeeded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.kobakei.ratethisapp.RateThisApp
的用法示例。
在下文中一共展示了RateThisApp.showRateDialogIfNeeded方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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() {
}
});
}
示例2: 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);
}
示例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);
}
示例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());
}
示例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);
}
示例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);
}
}
示例7: 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);
}
示例8: 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);
}
示例9: 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);
}
示例10: 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);
}
示例11: 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() {
}
});
}