@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,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);
}
项目:androidwisprclient
文件:BackupAgentHelperWrapper.java
public BackupAgentHelperWrapper() {
if (isAvailable) {
instance = new BackupAgentHelper();
Log.d(TAG,"instance:" + instance);
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。