diff --git a/app/build.gradle b/app/build.gradle index 76ffb45..407b223 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,7 @@ import io.sentry.android.gradle.instrumentation.logcat.LogcatLevel plugins { - id "io.sentry.android.gradle" version "5.8.0" + id "io.sentry.android.gradle" version "5.9.0" id 'com.android.application' id 'kotlin-android' id 'com.ydq.android.gradle.native-aar.import' @@ -82,7 +82,6 @@ android { } dependencies { - implementation 'io.sentry:sentry-android:8.17.0' // TODO remove this line when new version of the plugin is out // This should be included by default in the Android SDK, but it seems to be a problem with v8+ of the SDK, so we have to manually add it implementation 'io.sentry:sentry-native-ndk:0.8.3' implementation 'androidx.appcompat:appcompat:1.3.0' @@ -155,8 +154,4 @@ sentry { minLevel = LogcatLevel.VERBOSE } } - // TODO remove this line when new version of the plugin is out - autoInstallation { - sentryVersion = "8.17.0" - } } diff --git a/app/src/main/java/com/example/vu/android/MyApplication.java b/app/src/main/java/com/example/vu/android/MyApplication.java index 64d7f31..ee85151 100644 --- a/app/src/main/java/com/example/vu/android/MyApplication.java +++ b/app/src/main/java/com/example/vu/android/MyApplication.java @@ -171,7 +171,6 @@ public void onCreate() { } private void launchUserFeedback(SentryId sentryId) { - /* TODO replace with Sentry.showUserFeedback() when new version of the plugin is out Sentry.showUserFeedbackDialog(sentryId, options -> { options.setFormTitle("Ooops, Checkout Failed!"); options.setMessagePlaceholder("OMG! What happened??"); @@ -179,44 +178,8 @@ private void launchUserFeedback(SentryId sentryId) { options.setShowEmail(true); options.setSubmitButtonLabel("Submit"); options.setCancelButtonLabel("Cancel"); - options.setUseSentryUser(false); - }*/ - - AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(mCurrentActivity); - final EditText editTextName1 = new EditText(MyApplication.this); - editTextName1.setHint("OMG! What happened??"); - - LinearLayout layoutName = new LinearLayout(this); - layoutName.setOrientation(LinearLayout.VERTICAL); - layoutName.setPadding(60, 20, 60, 20); - layoutName.addView(editTextName1); - alertDialogBuilder.setView(layoutName); - - alertDialogBuilder.setTitle("Ooops, Checkout Failed!"); - alertDialogBuilder.setPositiveButton("Submit", new DialogInterface.OnClickListener(){ - @Override - public void onClick(DialogInterface arg0, int arg1) { - Toast.makeText(mCurrentActivity,"Thank you!",Toast.LENGTH_LONG).show(); - String txt = editTextName1.getText().toString(); // variable to collect user input - - Feedback feedback = new Feedback(txt); - feedback.setAssociatedEventId(sentryId); - feedback.setContactEmail("john.doe@example.com"); - feedback.setName("John Doe"); - Sentry.captureFeedback(feedback); - - } - }); - - alertDialogBuilder.setNegativeButton("Cancel",new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.cancel(); - } + options.setUseSentryUser(true); }); - - AlertDialog alertDialog = alertDialogBuilder.create(); - alertDialog.show(); } } \ No newline at end of file