本文整理汇总了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;
}
示例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";
}
}
示例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();
}
}
示例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
}
}
示例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());
}
示例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();
}
示例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 );
}
}
示例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);
}
}
}
}