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


Java BackupAgentHelper类代码示例

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


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

示例1: onCreate

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

    String mode = null;
    if(getIntent().getExtras() != null)
        mode = getIntent().getExtras().getString("mode");

    if (Build.VERSION.SDK_INT < 16)
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES | GameHelper.CLIENT_SNAPSHOT);
    gameHelper.setup(this);
    helper = new BackupAgentHelper();
    //gameHelper.setConnectOnStart(true);

    final AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
    config.useAccelerometer = true;
    config.useWakelock = true;
    config.useImmersiveMode = false;
    config.useGyroscope = true;
    //initialize(new TDGalaxy(this, null, this), config);
    View view = initializeForView(new TDGalaxy(mode,this, null, this, this), config);
    RelativeLayout layout = new RelativeLayout(this);
    MobileAds.initialize(this, Constants.ADSENSE_ID);

    banner = new AdView(this);
    banner.setAdSize(AdSize.SMART_BANNER);
    banner.setAdUnitId(Constants.AD_BANNER);
    banner.setBackgroundColor(Color.BLACK);

    rewardVideo = MobileAds.getRewardedVideoAdInstance(this);
    rewardVideo.setRewardedVideoAdListener(this);
    rewardVideo.loadAd(Constants.AD_VIDEO, new AdRequest.Builder().build());

    RelativeLayout.LayoutParams adParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
    adParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
    adParams.addRule(RelativeLayout.CENTER_IN_PARENT);
    layout.addView(view);
    layout.addView(banner, adParams);
    setContentView(layout);
    banner.setVisibility(View.VISIBLE);
}
 
开发者ID:justinmarentette11,项目名称:Tower-Defense-Galaxy,代码行数:43,代码来源:AndroidLauncher.java

示例2: BackupAgentHelperWrapper

import android.app.backup.BackupAgentHelper; //导入依赖的package包/类
public BackupAgentHelperWrapper() {
	if (isAvailable) {
		instance = new BackupAgentHelper();
		Log.d(TAG, "instance:" + instance);
	}
}
 
开发者ID:gjedeer,项目名称:androidwisprclient,代码行数:7,代码来源:BackupAgentHelperWrapper.java


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