本文整理汇总了Java中com.networkbench.agent.impl.NBSAppAgent类的典型用法代码示例。如果您正苦于以下问题:Java NBSAppAgent类的具体用法?Java NBSAppAgent怎么用?Java NBSAppAgent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NBSAppAgent类属于com.networkbench.agent.impl包,在下文中一共展示了NBSAppAgent类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.networkbench.agent.impl.NBSAppAgent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//添加Activity到堆栈
NBSAppAgent.setLicenseKey("d8bd3a33837242539d426e102f443369").withLocationServiceEnabled(true).start(this);
AppManager.getAppManager().addActivity(this);
setContentView(R.layout.activity_main);
appContext = (AppContext) getApplication();
mFragmentManager = getSupportFragmentManager();
initView();
if (appContext.Meeting() != null) {
loadMeeting(appContext.Meeting().getUrls().Meeting());
}
//检查新版本
UpdateManager.getUpdateManager().checkAppUpdate(this, false);
}
示例2: onCreate
import com.networkbench.agent.impl.NBSAppAgent; //导入依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mContext = this;
setContentView(R.layout.activity_main);
setData();
initView();
NBSAppAgent
.setLicenseKey("52d5f19f17d849d1b7cf04dc686969dd")
.withLocationServiceEnabled(true)
.start(this.getApplicationContext());
testCopy();
}
示例3: onCreate
import com.networkbench.agent.impl.NBSAppAgent; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final View view = View.inflate(this, R.layout.app_start, null);
setContentView(view);
NBSAppAgent.setLicenseKey("d8bd3a33837242539d426e102f443369").withLocationServiceEnabled(true).start(this);
mBtnEnter = (ImageView) findViewById(R.id.flip);
mBtnEnter.setOnClickListener(this);
//渐变展示启动屏
AlphaAnimation aa = new AlphaAnimation(0.3f,1.0f);
aa.setDuration(1000);//2000
view.startAnimation(aa);
//处理初始化业务
initThread = new Thread(doInit);
initThread.start();
//兼容低版本cookie(1.5版本以下,包括1.5.0,1.5.1)
AppContext appContext = (AppContext)getApplication();
String cookie = appContext.getProperty("cookie");
if(StringUtils.isEmpty(cookie)) {
String cookie_name = appContext.getProperty("cookie_name");
String cookie_value = appContext.getProperty("cookie_value");
if(!StringUtils.isEmpty(cookie_name) && !StringUtils.isEmpty(cookie_value)) {
cookie = cookie_name + "=" + cookie_value;
appContext.setProperty("cookie", cookie);
appContext.removeProperty("cookie_domain","cookie_name","cookie_value","cookie_version","cookie_path");
}
}
}