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


Java BugSenseHandler.sendExceptionMessage方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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());

}
 
开发者ID:RamallahDroid,项目名称:tab-msh,代码行数:33,代码来源:MainActivity.java

示例6: downloadFfmpeg

import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
private void downloadFfmpeg() {
	String link = getString(R.string.ffmpeg_download_dialog_msg_link, cpuVers);

	Utils.logger("d", "FFmpeg download link: " + link, DEBUG_TAG);
	
       Request request = new Request(Uri.parse(link));
       request.setDestinationInExternalFilesDir(nContext, null, ffmpegBinName);
       request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE);
       request.setVisibleInDownloadsUi(false);
       request.setTitle(getString(R.string.ffmpeg_download_notification));
       dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
       try {
       	enqueue = dm.enqueue(request);
       } catch (IllegalArgumentException e) {
    	Log.e(DEBUG_TAG, "downloadFfmpeg: " + e.getMessage());
    	Toast.makeText(this,  this.getString(R.string.no_downloads_sys_app), Toast.LENGTH_LONG).show();
    	BugSenseHandler.sendExceptionMessage(DEBUG_TAG + "-> downloadFfmpeg", e.getMessage(), e);
    } catch (SecurityException se) {
    	request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, ffmpegBinName);
    	enqueue = dm.enqueue(request);
    	DIR = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath();
    	BugSenseHandler.sendExceptionMessage(DEBUG_TAG + "-> downloadFfmpeg", se.getMessage(), se);
    } catch (NullPointerException ne) {
    	Log.e(DEBUG_TAG, "callDownloadApk: " + ne.getMessage());
    	BugSenseHandler.sendExceptionMessage(DEBUG_TAG + "-> callDownloadApk: ", ne.getMessage(), ne);
    	Toast.makeText(this, getString(R.string.error), Toast.LENGTH_LONG).show();
    }
       
	ffmpegBinObserver = new Observer.YtdFileObserver(DIR);
       ffmpegBinObserver.startWatching();
}
 
开发者ID:thatapps,项目名称:goloader,代码行数:32,代码来源:FfmpegDownloadService.java

示例7: forkShell

import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
private void forkShell()
{
	final ProcessBuilder shellBuilder = new ProcessBuilder( mRoot ? mSu : mSh );

       setUpLdLibraryPath( shellBuilder );

	if ( LOCAL_LOGD )
		Log.d( mTag, String.format( 
				"invoking external process: %s", 
				Util.join( shellBuilder.command(), ' ' )
		));

	try
	{
		mShellProcess = shellBuilder.start();
	}
	catch (IOException e)
	{
		// Something went fundamentally wrong as either
		// /system/bin/sh or /system/bin/su could not be
		// found. This is a border line case which really
		// should have been already handled before run()
		// was called!
		
		Log.e( mTag, String.format( 
				"invoking external process: %s", 
				Util.join( shellBuilder.command(), ' ' ),
				e
		));
           if (mDoBugSenseExec)
           {
               BugSenseHandler.sendExceptionMessage(
                       "DEBUG",
                       String.format(
                               "invoking external process: %s",
                               Util.join( shellBuilder.command(), ' ' )
                       ),
                       e
               );
           }

		onExecuteFailed( e );
	}
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:45,代码来源:Shell.java

示例8: HistoryStore

import com.bugsense.trace.BugSenseHandler; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private HistoryStore(Parcel in) {
    mMaxSize = in.readInt();

    int count = in.readInt();
    for (int i = 0; i < count; i++)
    	try {
    		mHistoryList.add((A) in.readParcelable(null)); // this (maybe sometimes) crashes with a BadParcelableException
    	} catch (BadParcelableException e1) { 
    		Log.e("afc_HistoryStore", "BadParcelableException: " + e1.getMessage());
    		BugSenseHandler.sendExceptionMessage("afc_HistoryStore", "readParcelable_1: " + e1.getMessage(), e1);
    		try {
    			mHistoryList.add((A) in.readParcelable(HistoryStore.class.getClassLoader()));
    		} catch (BadParcelableException e2) {
    			Log.e("afc_HistoryStore", "BadParcelableException: " + e2.getMessage());
        		BugSenseHandler.sendExceptionMessage("afc_HistoryStore", "readParcelable_2: " + e2.getMessage(), e2);
        		try {
        			mHistoryList.add((A) in.readParcelable(getClass().getClassLoader()));
        		} catch (BadParcelableException e3) {
        			Log.e("afc_HistoryStore", "BadParcelableException: " + e3.getMessage());
            		BugSenseHandler.sendExceptionMessage("afc_HistoryStore", "readParcelable_3: " + e3.getMessage(), e3);
        		}
    		}
    	}
}
 
开发者ID:thatapps,项目名称:goloader,代码行数:26,代码来源:HistoryStore.java


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