Last active
October 22, 2021 01:59
-
-
Save navczydev/f9a0ee16de0bcce275a1600b4b3b48b6 to your computer and use it in GitHub Desktop.
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
class NotificationReceiver : BroadcastReceiver() { | |
override fun onReceive(context: Context, intent: Intent) { | |
// from Android12 this will not work | |
// Indirect notification activity start (trampoline) from PACKAGE_NAME, \ this should be | |
//avoided for performance reasons. | |
context.startActivity(Intent(context, NotificationTrampolineActivity::class.java).apply { | |
flags = Intent.FLAG_ACTIVITY_NEW_TASK | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment