55import android .content .pm .PackageManager ;
66import android .support .annotation .NonNull ;
77
8- import com .facebook .react .ReactApplication ;
98import com .facebook .react .bridge .Arguments ;
109import com .facebook .react .bridge .Promise ;
1110import com .facebook .react .bridge .ReactApplicationContext ;
5251public class RNSentryModule extends ReactContextBaseJavaModule {
5352
5453 private static final Pattern mJsModuleIdPattern = Pattern .compile ("(?:^|[/\\ \\ ])(\\ d+\\ .js)$" );
55- private static final String versionString = "0.37.1 " ;
54+ private static final String versionString = "0.35.4 " ;
5655 private static final String sdkName = "sentry-react-native" ;
5756
5857 private final ReactApplicationContext reactContext ;
59- private final ReactApplication reactApplication ;
6058
6159 private static AndroidEventBuilderHelper androidHelper ;
6260 private static PackageInfo packageInfo ;
@@ -65,18 +63,13 @@ public class RNSentryModule extends ReactContextBaseJavaModule {
6563 private static ReadableMap tags ;
6664 private static SentryClient sentryClient ;
6765
68- public RNSentryModule (ReactApplicationContext reactContext , ReactApplication reactApplication ) {
66+ public RNSentryModule (ReactApplicationContext reactContext ) {
6967 super (reactContext );
7068 this .reactContext = reactContext ;
71- this .reactApplication = reactApplication ;
7269 RNSentryModule .extra = new WritableNativeMap ();
7370 RNSentryModule .packageInfo = getPackageInfo (reactContext );
7471 }
7572
76- public ReactApplication getReactApplication () {
77- return reactApplication ;
78- }
79-
8073 @ Override
8174 public String getName () {
8275 return "RNSentry" ;
@@ -109,9 +102,8 @@ public void startWithDsnString(String dsnString, final ReadableMap options, Prom
109102 sentryClient .addEventSendCallback (new EventSendCallback () {
110103 @ Override
111104 public void onFailure (Event event , Exception exception ) {
112- // This needs to be there, otherwise in case of no internet the users app will not
113- // crash since we do not propagate the error further. The system needs to be
114- // overhauled to remove this "hack".
105+ // This needs to be there, otherwise in case of not internet the users app will not
106+ // crash since we do not propagate the error further.
115107 RNSentryEventEmitter .sendEvent (reactContext , RNSentryEventEmitter .SENTRY_EVENT_STORED , new WritableNativeMap ());
116108 RNSentryEventEmitter .sendEvent (reactContext , RNSentryEventEmitter .SENTRY_EVENT_SENT_SUCCESSFULLY , new WritableNativeMap ());
117109 }
0 commit comments