2014-02-25 31 views
1

我尝试在我的Android应用程序中实现BugSense,但我无法看到我提交的自定义数据。我真的找不到问题出在哪里,因为我收到错误报告,但没有自定义数据。我实现了com.bugsense.trace.ExceptionCallback来接收“lastBreath”方法中所有未处理的异常。如何使用自定义数据正确使用BugSense?

这里是我的示例代码:

@Override 
public void lastBreath(Exception arg0) { 
    Log.w(TAG, "executing lastBreath"); 
    // adding current details to crash data 
    HashMap<String, String> errorDetails = new HashMap<String, String>(); 
    errorDetails.put("testKey", "testValue"); 
    errorDetails.put("testKey2", "testValue2"); 
    BugSenseHandler.sendExceptionMap(errorDetails, arg0); 
    Log.w(TAG, "lastBreath executed"); 
} 

这产生了一个错误报告,但我不知道在哪里可以找到“密押”和“testKey2”的自定义值。我使用官方网站的示例代码,那么问题在哪里?谢谢你的帮助。

回答

1

我正在做这个数据收集有点不同于你。以下是我的工作方式:

//Call the initAndStartSession right before the setContentView of your activity (onCreate method) 
BugSenseHandler.initAndStartSession(UserLogin.this, APIKEY); 
//Add the values that you need to monitor 
BugSenseHandler.addCrashExtraData("testKey", testKey); 
BugSenseHandler.addCrashExtraData("testKey2", testKey2); 

一旦发生错误,请转到您的BugSense错误页面。 (该链接应该类似于:https://www.bugsense.com/dashboard/project/YOUR_PROJECT_ID/errors/),然后单击异常链接(如下图所示)。

Errors Page

现在,一旦出错页面上,单击“错误实例”

Error Instances

现在,如果你点击扳手图标,你会看到你的“密押”和“testKey2”可供显示。 Last Step

希望它的作品!

相关问题