-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
62 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,9 @@ | |
<meta-data | ||
android:name="flutterEmbedding" | ||
android:value="2" /> | ||
|
||
<!-- sentry --> | ||
<meta-data android:name="io.sentry.dsn" android:value="https://[email protected]/5265206" /> | ||
</application> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
|
12 changes: 12 additions & 0 deletions
12
android/app/src/main/kotlin/com/example/flutterducafecatnews/CrashHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.example.flutterducafecatnews; | ||
|
||
import java.lang.Thread.UncaughtExceptionHandler; | ||
import io.sentry.core.Sentry; | ||
|
||
public class CrashHandler implements UncaughtExceptionHandler { | ||
|
||
@Override | ||
public void uncaughtException(Thread t, Throwable e) { | ||
Sentry.captureException(e); | ||
} | ||
} |
7 changes: 5 additions & 2 deletions
7
android/app/src/main/kotlin/com/example/flutterducafecatnews/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
package com.example.flutterducafecatnews | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.annotation.NonNull | ||
import io.flutter.embedding.android.FlutterActivity | ||
import io.flutter.embedding.engine.FlutterEngine | ||
import io.flutter.plugins.GeneratedPluginRegistrant | ||
|
||
|
||
class MainActivity: FlutterActivity() { | ||
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { | ||
GeneratedPluginRegistrant.registerWith(flutterEngine); | ||
val crashHandler = CrashHandler() | ||
Thread.setDefaultUncaughtExceptionHandler(crashHandler) | ||
GeneratedPluginRegistrant.registerWith(flutterEngine) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri Jun 23 08:50:38 CEST 2017 | ||
#Fri Jun 05 11:09:52 CST 2020 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
import UIKit | ||
import Flutter | ||
import Sentry | ||
|
||
@UIApplicationMain | ||
@objc class AppDelegate: FlutterAppDelegate { | ||
|
||
override func application( | ||
_ application: UIApplication, | ||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? | ||
) -> Bool { | ||
|
||
SentrySDK.start(options: [ | ||
"dsn": "https://[email protected]/5265498", | ||
"debug": true, // Enabled debug when first installing is always helpful | ||
"enableAutoSessionTracking": true | ||
]) | ||
|
||
NSSetUncaughtExceptionHandler { exception in | ||
print(exception) | ||
SentrySDK.capture(message: exception.description) | ||
SentrySDK.capture(exception: exception) | ||
} | ||
|
||
GeneratedPluginRegistrant.register(with: self) | ||
return super.application(application, didFinishLaunchingWithOptions: launchOptions) | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters