本文整理汇总了Java中net.hockeyapp.android.CrashManager类的典型用法代码示例。如果您正苦于以下问题:Java CrashManager类的具体用法?Java CrashManager怎么用?Java CrashManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CrashManager类属于net.hockeyapp.android包,在下文中一共展示了CrashManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkForCrashes
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
@SuppressWarnings("NonBooleanMethodNameMayNotStartWithQuestion")
private void checkForCrashes()
{
CrashManagerListener listener = new CrashManagerListener()
{
public String getStringForResource(int resourceID)
{
switch (resourceID)
{
case Strings.CRASH_DIALOG_TITLE_ID:
return getResources().getString(R.string.crash_dialog_title);
case Strings.CRASH_DIALOG_MESSAGE_ID:
return getResources().getString(R.string.crash_dialog_message);
case Strings.CRASH_DIALOG_NEGATIVE_BUTTON_ID:
return getResources().getString(R.string.crash_dialog_negative_button);
case Strings.CRASH_DIALOG_POSITIVE_BUTTON_ID:
return getResources().getString(R.string.crash_dialog_positive_button);
default:
return null;
}
}
};
CrashManager.register(this, HOCKEY_KEY, listener);
}
示例2: checkForCrashes
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
public static void checkForCrashes(Activity context) {
CrashManager.register(context, BuildVars.DEBUG_VERSION ? BuildVars.HOCKEY_APP_HASH_DEBUG : BuildVars.HOCKEY_APP_HASH, new CrashManagerListener() {
@Override
public boolean includeDeviceData() {
return true;
}
});
}
示例3: onResume
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
@Override
protected void onResume() {
super.onResume();
String hockeyAppId = getMetaData("net.hockeyapp.android.appIdentifier");
if (hockeyAppId != null) {
CrashManager.register(this);
Tracking.startUsage(this);
}
}
示例4: registerCrashReport
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
public static void registerCrashReport(Context context){
final String hockeyappToken = KeyUtilities.getToken(context, "hockeyapp");
if (hockeyappToken != null && !hockeyappToken.equals("")) {
if (!BuildConfig.DEBUG) {
CrashManager.register(context, hockeyappToken, new CrashManagerListener() {
public boolean shouldAutoUploadCrashes() {
return true;
}
});
} else {
CrashManager.register(context, hockeyappToken);
}
}
}
示例5: registerCrashHandler
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
@Override
public void registerCrashHandler(@NonNull Context context) {
L.v("Registering for HockeyApp crash handling.");
HockeyAppExceptionHandler handler = new HockeyAppExceptionHandler(crashListener, true);
handler.install();
CrashManager.initialize(context, appId, crashListener);
}
示例6: checkForCrashes
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
private void checkForCrashes() {
final String appId = Build.isExternal()
? Secrets.HockeyAppId.EXTERNAL
: Secrets.HockeyAppId.INTERNAL;
CrashManager.register(this, appId, new CrashManagerListener() {
public boolean shouldAutoUploadCrashes() {
return true;
}
});
}
示例7: checkForCrashes
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
private void checkForCrashes() {
CrashManager.register(this, HockeyConfig.HOCKEYAPP_ID, new CrashManagerListener() {
@Override
public boolean shouldAutoUploadCrashes() {
return HockeyConfig.HOCKEYAPP_AUTOSEND;
}
});
}
示例8: initErrorHandler
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
/**
* Init ErrorHandler, is initialized only one time.
*
* @param context
*/
static void initErrorHandler(Context context) {
synchronized (INITLOCK) {
if (!initialized) {
initialized = true;
CrashManager.register(context,
"96a040ec387e98f31c61358f01722ddc", new CListener());
}
}
}
示例9: init
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
public void init() {
CrashManager.register(application, application.getString(R.string.hockey_app_id),
new CrashManagerListener() {
@Override
public boolean shouldAutoUploadCrashes() {
return true;
}
});
application.registerActivityLifecycleCallbacks(this);
}
示例10: checkForCrashes
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
private void checkForCrashes() {
// Send crash reports only for release versions
if (BuildConfig.BUILD_TYPE.equals(DCConstants.BUILD_TYPE_RELEASE)) {
CrashManager.register(this);
}
}
示例11: checkForCrashes
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
/**
* HockeyApp app management event handler
*/
private void checkForCrashes() {
CrashManager.register(this);
}
示例12: checkForCrashes
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
private void checkForCrashes() {
CrashManager.register(this);
}
示例13: checkForCrashes
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
public static void checkForCrashes(Context ctx) {
if (!BuildConfig.DEBUG) {
CrashManager.register(ctx);
}
}
示例14: checkCrashes
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
@Override
public void checkCrashes(@NonNull Activity activity) {
L.v("Checking for HockeyApp crashes.");
LocaleManager.initialize(activity.getApplicationContext());
CrashManager.register(activity, appId, crashListener);
}
示例15: init
import net.hockeyapp.android.CrashManager; //导入依赖的package包/类
void init(Context context) {
CrashManager.register(context);
}