diff --git a/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt b/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt index cec51bea0..ec23e0265 100644 --- a/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt +++ b/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt @@ -8,7 +8,6 @@ import io.legado.app.constant.Bus import io.legado.app.help.ActivityHelp import io.legado.app.ui.readbook.ReadBookActivity import io.legado.app.utils.postEvent -import org.jetbrains.anko.startActivity /** @@ -48,7 +47,9 @@ class MediaButtonReceiver : BroadcastReceiver() { private fun readAloud(context: Context) { ActivityHelp.isExist(ReadBookActivity::class.java).let { if (!it) { - context.startActivity() + val intent = Intent(context, ReadBookActivity::class.java) + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + context.startActivity(intent) } } postEvent(Bus.READ_ALOUD, true)