public static void checkForCrashes(Activity context) {
   CrashManager.register(
       context,
       BuildVars.HOCKEY_APP_HASH,
       new CrashManagerListener() {
         @Override
         public boolean includeDeviceData() {
           return true;
         }
       });
 }
示例#2
0
  @Override
  protected void onResume() {
    IntentFilter filter = new IntentFilter();
    filter.addAction(SyncAdapter.SYNC_PROGRESS);
    filter.addAction(SyncAdapter.SYNC_STOP);
    filter.addAction(GcmTaskService.SERVICE_ACTION_EXECUTE_TASK);
    registerReceiver(mSyncFinishedReceiver, filter);
    mSyncFinishedReceiverRegistered = true;
    super.onResume();

    AppLog.d("Mark updates as viewed.");
    mPreferences.markViewed(true);

    notifySyncStop();
    CrashManager.register(this, Util.getAppIdentifier(this), App.provide(this).crashListener());
  }
  @ReactMethod
  public void start() {
    if (_initialized) {
      FeedbackManager.register(_activity, _token, null);

      CrashManager.register(_activity, _token, _crashManagerListener);

      int authenticationMode;
      switch (_authType) {
        case AUTHENTICATION_TYPE_EMAIL_SECRET:
          {
            authenticationMode = LoginManager.LOGIN_MODE_EMAIL_ONLY;
            break;
          }
        case AUTHENTICATION_TYPE_EMAIL_PASSWORD:
          {
            authenticationMode = LoginManager.LOGIN_MODE_EMAIL_PASSWORD;
            break;
          }
        case AUTHENTICATION_TYPE_DEVICE_UUID:
          {
            authenticationMode = LoginManager.LOGIN_MODE_VALIDATE;
            break;
          }
        case AUTHENTICATION_TYPE_WEB:
          {
            throw new IllegalArgumentException("Web authentication is not supported!");
          }
        case AUTHENTICATION_TYPE_ANONYMOUS:
        default:
          {
            authenticationMode = LoginManager.LOGIN_MODE_ANONYMOUS;
            break;
          }
      }

      LoginManager.register(_context, _token, _appSecret, authenticationMode, _activity.getClass());
      LoginManager.verifyLogin(_activity, _activity.getIntent());

      _crashManagerListener.deleteMetadataFileIfExists();
    }
  }
 /** HockeyApp integration */
 private void checkForCrashes() {
   CrashManager.register(this, getString(R.string.hockeyapp_key));
 }