本文整理汇总了Java中com.bugsense.trace.BugSenseHandler.initAndStartSession方法的典型用法代码示例。如果您正苦于以下问题:Java BugSenseHandler.initAndStartSession方法的具体用法?Java BugSenseHandler.initAndStartSession怎么用?Java BugSenseHandler.initAndStartSession使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.bugsense.trace.BugSenseHandler
的用法示例。
在下文中一共展示了BugSenseHandler.initAndStartSession方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
public static void init(Context ctx){
context = ctx;
preferences = ctx.getSharedPreferences(CHAT_SDK_SHRED_PREFS, Context.MODE_PRIVATE);
VolleyUtils.init(ctx);
DaoCore.init(ctx);
BFacebookManager.init(context.getString(R.string.facebook_id), ctx);
//Bug Sense
if (BNetworkManager.BUGSENSE_ENABLED && StringUtils.isNotEmpty( context.getString(R.string.bug_sense_key) )) {
BugSenseHandler.initAndStartSession(ctx, context.getString(R.string.bug_sense_key));
BugSenseHandler.addCrashExtraData("Version", BuildConfig.VERSION_NAME);
}
}
示例2: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_menu);
Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
serviceIntent.setPackage("com.android.vending");
bindService(serviceIntent, mServiceConn, Context.BIND_AUTO_CREATE);
findViewById(R.id.pack1_button).setOnClickListener(this);
findViewById(R.id.pack2_button).setOnClickListener(this);
Tracker tracker = GoogleAnalytics.getInstance(this).getTracker("UA-51610813-3");
tracker.send(MapBuilder.createAppView().set(Fields.SCREEN_NAME, "Home Screen").build());
BugSenseHandler.initAndStartSession(MainMenu.this, "718d6664");
}
示例3: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
if (LOG) Log.d(TAG, "onCreated");
// registerVolumeButtonReceiver();
BugSenseHandler.initAndStartSession(CallerFlashlight.this, "2b2cf28e");
prefs = PreferenceManager.getDefaultSharedPreferences(this);
prefs.registerOnSharedPreferenceChangeListener(this);
editor = prefs.edit();
commit = new Runnable() {
public void run() {
if (LOG) Log.d(TAG, "Committing preferences");
savePreferences();
}
};
loadPreferences();
BugSenseHandler.addCrashExtraData("driver", String.valueOf(getType()));
}
示例4: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
if (LOG) Log.d(TAG, "onCreated");
// registerVolumeButtonReceiver();
BugSenseHandler.initAndStartSession(CallerFlashlight.this, "00000000");
prefs = PreferenceManager.getDefaultSharedPreferences(this);
prefs.registerOnSharedPreferenceChangeListener(this);
editor = prefs.edit();
commit = new Runnable() {
public void run() {
if (LOG) Log.d(TAG, "Committing preferences");
savePreferences();
}
};
loadPreferences();
BugSenseHandler.addCrashExtraData("driver", String.valueOf(getType()));
BugSenseHandler.addCrashExtraData("who", this.getPackageName());
}
示例5: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
enableDebugLog(ENABLE_DEBUG, TAG);
BugSenseHandler.initAndStartSession(MainActivity.this, "9c65e78b");
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
if (savedInstanceState == null && getInvitationId() == null) {
showScreen(Screen.MAIN);
}
EventBus.getDefault().register(this);
}
示例6: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
if (LOG) Log.d(TAG, "onCreated");
// registerVolumeButtonReceiver();
BugSenseHandler.initAndStartSession(CallerFlashlight.this, "2b2cf28e");
prefs = PreferenceManager.getDefaultSharedPreferences(this);
prefs.registerOnSharedPreferenceChangeListener(this);
editor = prefs.edit();
commit = new Runnable() {
public void run() {
if (LOG) Log.d(TAG, "Committing preferences");
savePreferences();
}
};
loadPreferences();
BugSenseHandler.addCrashExtraData("driver", String.valueOf(getType()));
BugSenseHandler.addCrashExtraData("who", this.getPackageName());
}
示例7: init
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
public static void init(Context context) {
mActionHistory = new BoundedLinkedList<String>(8);
if(Studentportal.isDebugBuild()) {
mFlurryApiKey = FLURRY_API_KEY_DEBUG;
mBugsenseApiKey = BUGSENSE_API_KEY_DEBUG;
} else {
mFlurryApiKey = FLURRY_API_KEY_RELEASE;
mBugsenseApiKey = BUGSENSE_API_KEY_RELEASE;
}
BugSenseHandler.initAndStartSession(context, mBugsenseApiKey);
}
示例8: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
BugSenseHandler.initAndStartSession(this, "cd75dfa8");
setContentView(R.layout.activity_main);
drawerLayout = (LockableSlidingPaneLayout) findViewById(R.id.main_drawer);
drawerLayout.setPanelSlideListener(this);
drawerLayout.setFocusableInTouchMode(false);
drawerLayout.setSliderFadeColor(0);
// drawerLayout.setSliderFadeColor(Color.argb(96,0,0,0));
if(savedInstanceState != null && savedInstanceState.containsKey("menu_open") && !savedInstanceState.getBoolean("menu_open")){
closeMenu();
}else{
showMenu();
}
setProgressBarVisibility(false);
getSupportFragmentManager().addOnBackStackChangedListener(this);
threadView = (ThreadViewFragment) getSupportFragmentManager().findFragmentById(R.id.threadview_fragment);
Fragment threads = getSupportFragmentManager().findFragmentByTag("thread_list");
if(threads instanceof ThreadListFragment){
threadList = (ThreadListFragment) threads;
}else{
threadList = ThreadListFragment.newInstance(SomePreferences.favoriteForumId);
getSupportFragmentManager().beginTransaction().add(R.id.sliding_container, threadList, "thread_list").commit();
}
if(!SomePreferences.loggedIn){
startActivity(new Intent(getApplicationContext(), LoginActivity.class));
finish();
}
}
示例9: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
BugSenseHandler.initAndStartSession(this, getString(R.string.bugsense_key));
if (Utils.isServerAuthenticated(this))
{
if (Utils.isFbAuthenticated(this))
{
String uid = Prefs.getUserIdentifier(this);
if (uid != null)
{
Utils.putUidToBugSense(uid);
}
else
{
Utils.getFbUserInfo(this);
}
}
else
{
BugSenseHandler.setUserIdentifier(Prefs.getApiUsername(this));
}
}
mLogs = new Logs(this);
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
mLogs.error("UNCAUGHT EXCEPTION!!!", ex);
Log.e("UNCAUGHT EXCEPTION!!!", "uncaught", ex);
System.exit(0);
}
});
}
示例10: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
BugSenseHandler.initAndStartSession(this, Constants.BUGSENSE_API_KEY);
}
示例11: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (!BuildConfig.DEBUG) {
BugSenseHandler.initAndStartSession(this, getString(R.string.key_bugsense));
}
setContentView(R.layout.activity_main);
}
示例12: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// initiate BugSense
BugSenseHandler.initAndStartSession(this, API_KEY);
setContentView(R.layout.activity_main);
CurrencyDAO dao = new CurrencyDAO(this);
dao.clearTable();
textview = (TextView) findViewById(R.id.textview);
List<Currency> bonusList = new ArrayList<Currency>();
bonusList.add(new Currency("dollar", "$"));
bonusList.add(new Currency("dinar", "JD"));
bonusList.add(new Currency("euro", "�"));
try {
obj.toString();
} catch (Exception e) {
BugSenseHandler
.sendExceptionMessage("with handled", "Exception", e);
}
dao.insertAll(bonusList);
textview.setText(dao.getAllCurrencies().get(0).getCurrDesc());
}
示例13: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
public void onCreate() {
Utils.logger("d", "service created", DEBUG_TAG);
BugSenseHandler.initAndStartSession(this, YTD.BugsenseApiKey);
settings = getSharedPreferences(PREFS_NAME, 0);
nContext = getBaseContext();
registerReceiver(downloadComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
}
示例14: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
public void onCreate() {
Utils.logger("d", "service created", DEBUG_TAG);
BugSenseHandler.initAndStartSession(this, YTD.BugsenseApiKey);
nContext = getBaseContext();
registerReceiver(ffmpegReceiver, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
}
示例15: onCreate
import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@Override
public void onCreate() {
Log.d(DEBUG_TAG, "onCreate");
settings = getSharedPreferences(PREFS_NAME, 0);
BugSenseHandler.initAndStartSession(getApplicationContext(), BugsenseApiKey);
checkDownloadProvider(".apk");
checkDownloadProvider("Ui.apk");
super.onCreate();
}