Android Open Source - HockeySDK-Android Crash Manager Listener






From Project

Back to project page HockeySDK-Android.

License

The source code is released under:

Apache License

If you think the Android project HockeySDK-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package net.hockeyapp.android;
//from  w  ww . j a  v  a  2  s  .  c  o  m
/**
 * <h3>Description</h3>
 * 
 * Abstract class for callbacks to be invoked from the CrashManager. 
 * 
 * <h3>License</h3>
 * 
 * <pre>
 * Copyright (c) 2011-2014 Bit Stadium GmbH
 * 
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 * </pre>
 *
 * @author Thomas Dohmke
 **/
public abstract class CrashManagerListener extends StringListener {
  /**
   * Return true to ignore the default exception handler, i.e. the user will not
   * get the alert dialog with the "Force Close" button.
   *
   * @return if true, the default handler is ignored
   */
  public boolean ignoreDefaultHandler() {
    return false;
  }

  /**
   * Return false to remove the device data (OS version, manufacturer, model)
   * from the crash log, e.g. if some of your testers are using unreleased
   * devices.
   *
   * @return if true, the crash report will include device data
   */
  public boolean includeDeviceData() {
    return true;
  }

  /**
   * Return false to remove the stable device identifier from the
   * crash log, e.g. if there are privacy concerns.
   *
   * @return if true, the crash report will include a stable device identifier
   */
  public boolean includeDeviceIdentifier() {
    return true;
  }

  /**
   * Return contact data or similar; note that this has privacy implications,
   * so you might want to return nil for release builds! The string will be
   * limited to 255 characters.
   *
   * @return the contact string
   */
  public String getContact() {
    return null;
  }
  
  /**
   * Return additional data, i.e. parts of the system log, the last server
   * response or similar. This string is not limited to a certain size.
   *
   * @return a description
   */
  public String getDescription() {
    return null;
  }
  
  /**
   * Return a user ID or similar; note that this has privacy implications,
   * so you might want to return nil for release builds! The string will be
   * limited to 255 characters.
   *
   * @return the user's ID
   */
  public String getUserID() {
    return null;
  }
  
  /**
   * Called when the crash manager found one or more crashes. Return true 
   * if you want to auto-send crashes (i.e. not ask the user)
   * 
   * @deprecated Replace this method with onNewCrashesFound, 
   *             onConfirmedCrashesFound, and shouldAutoUploadCrashReport.
   * @return if true, crashes are sent automatically
   */
  public boolean onCrashesFound() {
    return false;
  }
  
  /**
   * Return true if you want to auto-send crashes. Note that this method
   * is only called if new crashes were found. 
   *
   * @return if true, crashes are sent automatically
   */
  public boolean shouldAutoUploadCrashes() {
    return false;
  }

  /**
   * Called when the crash manager has found new crash logs. 
   */
  public void onNewCrashesFound() {
  }

  /**
   * Called when the crash manager has found crash logs that were already
   * confirmed by the user or should have been auto uploaded, but the upload
   * failed, e.g. in case of a network failure. 
   */
  public void onConfirmedCrashesFound() {
  }

  /**
   * Called when the crash manager has sent crashes to HockeyApp. 
   */
  public void onCrashesSent() {
  }
  
  /**
   * Called when the crash manager failed to send crashes to HockeyApp, e.g.
   * because the device has no network connections.
   */
  public void onCrashesNotSent() {
  }
  
  /**
   * Called when the user denied to send crashes to HockeyApp.
   */
  public void onUserDeniedCrashes() {
  }
}




Java Source Code List

net.hockeyapp.android.Constants.java
net.hockeyapp.android.CrashManagerListener.java
net.hockeyapp.android.CrashManager.java
net.hockeyapp.android.ExceptionHandler.java
net.hockeyapp.android.ExpiryInfoActivity.java
net.hockeyapp.android.FeedbackActivityInterface.java
net.hockeyapp.android.FeedbackActivity.java
net.hockeyapp.android.FeedbackManagerListener.java
net.hockeyapp.android.FeedbackManager.java
net.hockeyapp.android.LocaleManager.java
net.hockeyapp.android.LoginActivity.java
net.hockeyapp.android.LoginManagerListener.java
net.hockeyapp.android.LoginManager.java
net.hockeyapp.android.PaintActivity.java
net.hockeyapp.android.StringListener.java
net.hockeyapp.android.Strings.java
net.hockeyapp.android.Tracking.java
net.hockeyapp.android.UpdateActivityInterface.java
net.hockeyapp.android.UpdateActivity.java
net.hockeyapp.android.UpdateFragment.java
net.hockeyapp.android.UpdateInfoListener.java
net.hockeyapp.android.UpdateManagerListener.java
net.hockeyapp.android.UpdateManager.java
net.hockeyapp.android.adapters.MessagesAdapter.java
net.hockeyapp.android.listeners.DownloadFileListener.java
net.hockeyapp.android.listeners.SendFeedbackListener.java
net.hockeyapp.android.objects.ErrorObject.java
net.hockeyapp.android.objects.FeedbackAttachment.java
net.hockeyapp.android.objects.FeedbackMessage.java
net.hockeyapp.android.objects.FeedbackResponse.java
net.hockeyapp.android.objects.Feedback.java
net.hockeyapp.android.tasks.AttachmentDownloader.java
net.hockeyapp.android.tasks.CheckUpdateTaskWithUI.java
net.hockeyapp.android.tasks.CheckUpdateTask.java
net.hockeyapp.android.tasks.DownloadFileTask.java
net.hockeyapp.android.tasks.GetFileSizeTask.java
net.hockeyapp.android.tasks.LoginTask.java
net.hockeyapp.android.tasks.ParseFeedbackTask.java
net.hockeyapp.android.tasks.SendFeedbackTask.java
net.hockeyapp.android.utils.AsyncTaskUtils.java
net.hockeyapp.android.utils.Base64.java
net.hockeyapp.android.utils.ConnectionManager.java
net.hockeyapp.android.utils.DeviceUtils.java
net.hockeyapp.android.utils.FeedbackParser.java
net.hockeyapp.android.utils.ImageUtils.java
net.hockeyapp.android.utils.PrefsUtil.java
net.hockeyapp.android.utils.SimpleMultipartEntity.java
net.hockeyapp.android.utils.UiThreadUtil.java
net.hockeyapp.android.utils.Util.java
net.hockeyapp.android.utils.VersionCache.java
net.hockeyapp.android.utils.VersionHelper.java
net.hockeyapp.android.utils.ViewHelper.java
net.hockeyapp.android.views.AttachmentListView.java
net.hockeyapp.android.views.AttachmentView.java
net.hockeyapp.android.views.ExpiryInfoView.java
net.hockeyapp.android.views.FeedbackMessageView.java
net.hockeyapp.android.views.FeedbackView.java
net.hockeyapp.android.views.LoginView.java
net.hockeyapp.android.views.PaintView.java
net.hockeyapp.android.views.UpdateView.java