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