“Protected Apps” setting on Huawei phones, and how to handle it

后端 未结 7 1458
-上瘾入骨i
-上瘾入骨i 2020-11-22 09:48

I have a Huawei P8 with Android 5.0 that I\'m using for testing an app. The app needs to be running in the background, as it tracks BLE regions.

I\'ve discovered t

相关标签:
7条回答
  • 2020-11-22 10:31

    You can use this library to navigate the user to protected apps or autostart:

    AutoStarter

    If the phone supports autostart feature you can show to the user a hint to enable your app in these apps

    You can check by this method:

    AutoStartPermissionHelper.getInstance().isAutoStartPermissionAvailable(context)
    

    And for navigating the user to that page, simply call this:

    AutoStartPermissionHelper.getInstance().getAutoStartPermission(context)
    
    0 讨论(0)
提交回复
热议问题