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


Java BugSenseHandler类代码示例

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


BugSenseHandler类属于com.bugsense.trace包,在下文中一共展示了BugSenseHandler类的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);
    }
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:17,代码来源:BNetworkManager.java

示例2: onFailure

import com.bugsense.trace.BugSenseHandler; //导入依赖的package包/类
@Override
public void onFailure(FastRequest request, VolleyError error) {
    super.onFailure(request, error);
    if(error instanceof SessionError){
        FastAlert.error(this, error.getMessage());
        Activity activity = getActivity();
        if(activity != null){
            startActivity(new Intent(getActivity(), LoginActivity.class));
            getActivity().finish();
        }
    }else if(error instanceof SomeError){
        FastAlert.error(this, error.getMessage());
    }else{
        BugSenseHandler.sendException(error);
    }
}
 
开发者ID:2fast2fourier,项目名称:something.apk,代码行数:17,代码来源:SomeFragment.java

示例3: deliver

import com.bugsense.trace.BugSenseHandler; //导入依赖的package包/类
@Override
public void deliver(final Boolean success) {
    mLogs.info("SettingsFragment. Login succeed");
    mActivity.runOnUiThread(new Runnable() {
        @Override
        public void run() {
            Utils.setLoading(mActivity, false);

            if (!type.equals("FB"))
                BugSenseHandler.setUserIdentifier(Prefs.getApiUsername(mActivity));

            setupOptions();
            mActivity.startService(new Intent(mActivity, XmppService.class));
            if (mDoAfterLogin != null)
                mDoAfterLogin.run();
        }
    });
}
 
开发者ID:42cc,项目名称:p2psafety,代码行数:19,代码来源:SettingsFragment.java

示例4: 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");
}
 
开发者ID:AlexZaiats,项目名称:Coloring-book,代码行数:18,代码来源:MainMenu.java

示例5: 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()));
}
 
开发者ID:futerox,项目名称:FlashAlerts,代码行数:24,代码来源:CallerFlashlight.java

示例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, "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());
}
 
开发者ID:thatapps,项目名称:flashneo,代码行数:24,代码来源:CallerFlashlight.java

示例7: 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);
}
 
开发者ID:kingori,项目名称:ihatecolor_and,代码行数:20,代码来源:MainActivity.java

示例8: emit

import com.bugsense.trace.BugSenseHandler; //导入依赖的package包/类
public void emit(Context context, String text, byte[] picture, String fingerprint) {
    String media = GifMedia.mediaFromGIFbytes(picture);

    if (media == null) {
        // malformed GIF
        if (!BuildConfig.DEBUG) {
            BugSenseHandler.sendEvent("null gif, bytes==null "+ (picture == null));
        }
        return;
    }

    ChatRequest chatRequest = new ChatRequest(
            apiKey,
            text,
            media,
            fingerprint
    );
    BusManager.get().getChatBus().post(chatRequest);
}
 
开发者ID:RomainPiel,项目名称:meatspace-android,代码行数:20,代码来源:ApiManager.java

示例9: onAttach

import com.bugsense.trace.BugSenseHandler; //导入依赖的package包/类
@Override
public void onAttach(Activity activity) {
	super.onAttach(activity);
	//Log.w(MainActivity.TAG_SETUP, "onAttach()");
	
	mActivity = activity;
	
	// Make sure that the parent activity implemented the callback.
	try {
		mOnDoneWithSetupListener = (OnDoneWithSetupListener) mActivity;
	} catch (ClassCastException ex) {
		BugSenseHandler.log(MainActivity.TAG_SETUP, ex);
		
		throw new ClassCastException(mActivity.toString() + "must implement OnDoneWithSetupListener");
	}
}
 
开发者ID:akeeton,项目名称:Divide_And_Conquer_Card_Shuffler,代码行数:17,代码来源:SetupFragment.java

示例10: 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());
}
 
开发者ID:spirosbond,项目名称:CallerFlashlight,代码行数:24,代码来源:CallerFlashlight.java

示例11: onStartCommand

import com.bugsense.trace.BugSenseHandler; //导入依赖的package包/类
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
	copyEnabled = intent.getBooleanExtra("COPY", false);
	Utils.logger("d", "Copy to extSdcard: " + copyEnabled, DEBUG_TAG);
	
	audio = intent.getStringExtra("AUDIO");
	Utils.logger("d", "Audio extraction: " + audio, DEBUG_TAG);
	
	removeVideo = settings.getBoolean("remove_video", false);
	try {
		if (audio.equals("none")) removeVideo = false;
	} catch (NullPointerException ne) {
		removeVideo = false;
		Log.e(DEBUG_TAG, "DownloadsService: " + ne.getMessage());
    	BugSenseHandler.sendExceptionMessage(DEBUG_TAG + "-> DownloadsService: ", ne.getMessage(), ne);
	}
	Utils.logger("d", "Video removal: " + removeVideo, DEBUG_TAG);
	
	super.onStartCommand(intent, flags, startId);
	return START_NOT_STICKY;
}
 
开发者ID:thatapps,项目名称:goloader,代码行数:22,代码来源:DownloadsService.java

示例12: doInBackground

import com.bugsense.trace.BugSenseHandler; //导入依赖的package包/类
protected String doInBackground(String... urls) {
     try {
     	Utils.logger("d", "doInBackground...", DEBUG_TAG);
     	
     	if (settings.getBoolean("show_thumb", false)) {
     		downloadThumbnail(generateThumbUrl());
     	}
     	
     	return downloadUrl(urls[0]);
     } catch (IOException e) {
     	Log.e(DEBUG_TAG, "downloadUrl: " + e.getMessage());
BugSenseHandler.sendExceptionMessage(DEBUG_TAG + "-> downloadUrl: ", e.getMessage(), e);
         return "e";
     } catch (RuntimeException re) {
     	Log.e(DEBUG_TAG, "downloadUrl: " + re.getMessage());
BugSenseHandler.sendExceptionMessage(DEBUG_TAG + "-> downloadUrl: ", re.getMessage(), re);
//Toast.makeText(ShareActivity.this, getString(R.string.error), Toast.LENGTH_LONG).show();
return "e";
     }
 }
 
开发者ID:thatapps,项目名称:goloader,代码行数:21,代码来源:ShareActivity.java

示例13: tempDownloadToSdcard

import com.bugsense.trace.BugSenseHandler; //导入依赖的package包/类
private void tempDownloadToSdcard(Request request) {
	videoUri = Uri.parse(dir_Downloads.toURI() + composedVideoFilename);
    Utils.logger("d", "** NEW ** videoUri: " + videoUri, DEBUG_TAG);
    request.setDestinationUri(videoUri);
    try {
    	enqueue = dm.enqueue(request);
    } catch (IllegalArgumentException e) {
 	Log.e(DEBUG_TAG, "tempDownloadToSdcard: " + e.getMessage());
 	BugSenseHandler.sendExceptionMessage(DEBUG_TAG + "-> tempDownloadToSdcard", e.getMessage(), e);
 } catch (NullPointerException ne) {
 	Log.e(DEBUG_TAG, "callDownloadApk: " + ne.getMessage());
 	BugSenseHandler.sendExceptionMessage(DEBUG_TAG + "-> tempDownloadToSdcard: ", ne.getMessage(), ne);
 	Toast.makeText(this, getString(R.string.error), Toast.LENGTH_LONG).show();
 }catch (SecurityException se) {
 	Log.e(DEBUG_TAG, "callDownloadApk: " + se.getMessage());
 	BugSenseHandler.sendExceptionMessage(DEBUG_TAG + "-> tempDownloadToSdcard: ", se.getMessage(), se);
 	Toast.makeText(this, getString(R.string.error), Toast.LENGTH_LONG).show();
 }
}
 
开发者ID:thatapps,项目名称:goloader,代码行数:20,代码来源:ShareActivity.java

示例14: digest

import com.bugsense.trace.BugSenseHandler; //导入依赖的package包/类
private void digest(byte[] bytes) {
	try {
		IOUtils.write(bytes, digestOutputStream);
	} catch (Exception e) {
		BugSenseHandler.sendExceptionMessage( "DEBUG", "Digesting bytes", e );
		// ignore, all data goes to a NullOutputStream
	}
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:9,代码来源:ShareTunActivity.java

示例15: 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);
}
 
开发者ID:protyposis,项目名称:Studentenportal,代码行数:12,代码来源:Analytics.java


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