Do the download function, Notification opens the download list, the product requires click the back button at this time to restore to the previous one
HomeActivity, it is not difficult for participants, just add getActivities to PengingIntent
Pay attention to setting HomeActivity to singleTask to prevent the problem of repeatedly opening two HomeActivity
Known issue: On the download list page, clicking the notification bar to open DownloadListActivity will cause DownloadListActivity to restart
val intentHome = Intent(this, HomeActivity::class.java) intentHome.flags = Intent.FLAG_ACTIVITY_NEW_TASK val intent = Intent(this, DownloadListActivity::class.java) val pi = PendingIntent.getActivities(this, 0, arrayOf(intentHome, intent), PendingIntent.FLAG_CANCEL_CURRENT)