Twitter Fabric
2014-11-18
Kommentare
今天終於收到Twitter的Fabric(Yahhhhhh!)
首先登入後會導引你到Download Plugins
或者之後在Dashboard找中間這個按鈕
下圖是在Mac上安裝 Fabric.app
主要是提供三個功能
Crashlytics
If you’re not seeing crashes, check the following common causes of delays:
- 確保
Crashlytics SDK
的init line在其他第三方SDK之後
Custom Logging
// 不使用 Logcat 的方式
Crashlytics.log(msg);
// 使用 Logcat 的方式
Crashlytics.log(Log.ERROR,
"MyApp",
"Higgs-Boson detected! Bailing out...");
Custom Keys
Note: By default, Crashlytics currently supports a maximum of 64 key/value pairs
. Once you reach this threshold, additional values are not saved.
Crashlytics.setInt("current_level", 3);
User Information
void setUserIdentifier(String identifier);
void setUserName(String name);
void setUserEmail(String email);
Caught Exceptions
All logged exceptions will appear as “non-fatal” issues in the Fabric dashboard
try {
myMethodThatThrows();
} catch (Exception e) {
Crashlytics.logException(e);
// handle your exception here!
}