Skip to content

Commit 244a8da

Browse files
authored
Fix/task manager instances (#33)
* Updated AGP and the libs used. #30 * Fixes issue with double instances in the task manager. #32
1 parent 4da3b8d commit 244a8da

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

ORLib/src/main/java/io/openremote/orlib/service/ORFirebaseMessagingService.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,14 @@ class ORFirebaseMessagingService : com.google.firebase.messaging.FirebaseMessagi
211211
orAlertAction: ORAlertAction?
212212
): PendingIntent {
213213
val actionIntent = when {
214-
Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ->Intent(this, NotificationActivity::class.java)
214+
Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
215+
Intent(this, NotificationActivity::class.java).apply {
216+
flags = Intent.FLAG_ACTIVITY_NEW_TASK or
217+
Intent.FLAG_ACTIVITY_CLEAR_TASK or
218+
Intent.FLAG_ACTIVITY_NO_HISTORY or
219+
Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
220+
}
221+
}
215222
else -> Intent(this, ORMessagingActionService::class.java)
216223
}
217224
actionIntent.putExtra("notificationId", notificationId)

0 commit comments

Comments
 (0)