How To Start An Activity From Background in Android 10?

前端 未结 4 1123
暗喜
暗喜 2020-12-31 01:22

I am building an android app where I need to start an activity from background. I am using a ForegroundStarter which extends Service for accomplishing this. I have an activi

4条回答
  •  -上瘾入骨i
    2020-12-31 01:29

    I do not have enough reputation to comment solution https://stackoverflow.com/a/59067224/8995217 so I try to leave my answer on it for MIUI rom

    It seems need to grand some permissions for app running on Xiaomi phones. Go to phone settings -> Apps -> Manage apps then find your app.

    On app info page go to other permissions and enable the following options

    • Show on Lock screen
    • Display pop-up windows while running in the background
    • Permanent notification

    It works for Xiaomi Redmi Note 8T

提交回复
热议问题