Package org.mozilla.geckoview
Class CrashReporter
Object
org.mozilla.geckoview.CrashReporter
Sends a crash report to the Mozilla Socorro crash
report server.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GeckoResult<String>
sendCrashReport
(Context context, Intent intent, String appName) Sends a crash report to the Mozilla Socorro crash report server.static GeckoResult<String>
sendCrashReport
(Context context, Bundle intentExtras, String appName) Sends a crash report to the Mozilla Socorro crash report server.static GeckoResult<String>
sendCrashReport
(Context context, File minidumpFile, File extrasFile, String appName) Sends a crash report to the Mozilla Socorro crash report server.static GeckoResult<String>
sendCrashReport
(String serverURL, File minidumpFile, JSONObject extras) Sends a crash report to the Mozilla Socorro crash report server.
-
Constructor Details
-
CrashReporter
public CrashReporter()
-
-
Method Details
-
sendCrashReport
@AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull Context context, @NonNull Intent intent, @NonNull String appName) throws IOException, URISyntaxException Sends a crash report to the Mozilla Socorro crash report server.
TheappName
needs to be allowlisted for the server to accept the crash. File a bug if you would like to get your app added to the allowlist.- Parameters:
context
- The current Contextintent
- The Intent sent to theGeckoRuntime
crash handlerappName
- A human-readable app name.- Returns:
- A GeckoResult containing the crash ID as a String.
- Throws:
IOException
- This can be thrown if there was a networking error while sending the report.URISyntaxException
- This can be thrown if the crash server URI from the extra data was invalid.- See Also:
-
sendCrashReport
@AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull Context context, @NonNull Bundle intentExtras, @NonNull String appName) throws IOException, URISyntaxException Sends a crash report to the Mozilla Socorro crash report server.
TheappName
needs to be allowlisted for the server to accept the crash. File a bug if you would like to get your app added to the allowlist.- Parameters:
context
- The current ContextintentExtras
- The Bundle of extras attached to the Intent received by a crash handler.appName
- A human-readable app name.- Returns:
- A GeckoResult containing the crash ID as a String.
- Throws:
IOException
- This can be thrown if there was a networking error while sending the report.URISyntaxException
- This can be thrown if the crash server URI from the extra data was invalid.- See Also:
-
sendCrashReport
@AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull Context context, @NonNull File minidumpFile, @NonNull File extrasFile, @NonNull String appName) throws IOException, URISyntaxException Sends a crash report to the Mozilla Socorro crash report server.
TheappName
needs to be allowlisted for the server to accept the crash. File a bug if you would like to get your app added to the allowlist.- Parameters:
context
- The currentContext
minidumpFile
- AFile
referring to the minidump.extrasFile
- AFile
referring to the extras file.appName
- A human-readable app name.- Returns:
- A GeckoResult containing the crash ID as a String.
- Throws:
IOException
- This can be thrown if there was a networking error while sending the report.URISyntaxException
- This can be thrown if the crash server URI from the extra data was invalid.- See Also:
-
sendCrashReport
@AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull String serverURL, @NonNull File minidumpFile, @NonNull JSONObject extras) throws IOException, URISyntaxException Sends a crash report to the Mozilla Socorro crash report server.- Parameters:
serverURL
- The URL used to submit the crash report.minidumpFile
- AFile
referring to the minidump.extras
- AJSONObject
holding the parsed JSON from the extra file.- Returns:
- A GeckoResult containing the crash ID as a String.
- Throws:
IOException
- This can be thrown if there was a networking error while sending the report.URISyntaxException
- This can be thrown if the crash server URI from the extra data was invalid.- See Also:
-