From 81fdb3a6cc0baed79e5d06a9465558ece0159425 Mon Sep 17 00:00:00 2001 From: Anam Ansari Date: Wed, 13 Apr 2022 01:43:29 +0530 Subject: [PATCH 1/2] Changed the intent to RecordingScreenActivity instead of BaseMainActivity, when notification is clicked. --- .../app/recording/notification/RecordingNotification.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.envirocar.app/src/org/envirocar/app/recording/notification/RecordingNotification.java b/org.envirocar.app/src/org/envirocar/app/recording/notification/RecordingNotification.java index 235b7fb54..5d52429fc 100644 --- a/org.envirocar.app/src/org/envirocar/app/recording/notification/RecordingNotification.java +++ b/org.envirocar.app/src/org/envirocar/app/recording/notification/RecordingNotification.java @@ -48,6 +48,7 @@ import org.envirocar.app.recording.RecordingService; import org.envirocar.app.recording.RecordingState; import org.envirocar.app.recording.events.RecordingStateEvent; +import org.envirocar.app.views.recordingscreen.RecordingScreenActivity; import org.envirocar.core.logging.Logger; import org.envirocar.obd.events.TrackRecordingServiceStateChangedEvent; import org.envirocar.obd.service.BluetoothServiceState; @@ -96,7 +97,7 @@ public RecordingNotification(RecordingService recordingService, Bus eventBus) { this.context = recordingService; this.eventBus = eventBus; this.notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); - this.screenClass = BaseMainActivity.class; + this.screenClass = RecordingScreenActivity.class; this.channelId = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ? createChannel() : ""; } @@ -205,7 +206,7 @@ private synchronized void refreshStopped() { state = ServiceStateForNotification.CONNECTING; } - Intent i = new Intent(context, BaseMainActivity.class); + Intent i = new Intent(context, RecordingScreenActivity.class); PendingIntent pIntent = PendingIntent.getActivity(context, (int) System.currentTimeMillis(), i, 0); this.notification = new NotificationCompat.Builder(context, channelId) From c8bd9844c24d4a0d550db9e7f05cac426605e6f0 Mon Sep 17 00:00:00 2001 From: Anam Ansari Date: Wed, 13 Apr 2022 02:06:17 +0530 Subject: [PATCH 2/2] Changed the intent to RecordingScreenActivity instead of BaseMainActivity, when notification is clicked. 1 --- build.gradle | 2 +- org.envirocar.app/AndroidManifest.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index d2043fdb1..139b96c24 100644 --- a/build.gradle +++ b/build.gradle @@ -59,7 +59,7 @@ ext { compileSdkVersion = 31 targetSdkVersion = 31 buildToolsVersion = '30.0.2' - versionCode = 52 + versionCode = 51 versionName = "2.1.0" ndkVersion = "21.4.7075529" diff --git a/org.envirocar.app/AndroidManifest.xml b/org.envirocar.app/AndroidManifest.xml index 07dcbeeaa..a67fbfcf6 100644 --- a/org.envirocar.app/AndroidManifest.xml +++ b/org.envirocar.app/AndroidManifest.xml @@ -3,7 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" package="org.envirocar.app" android:installLocation="internalOnly" - android:versionCode="52" + android:versionCode="51" android:versionName="2.1.0" >