requestAccessForMediaType doesn't ask for permission

前端 未结 1 1160
北恋
北恋 2021-01-21 02:33

I noticed that my app doesn\'t request permission to use the camera. After some experimentation I figured out that the piece of code used to check permission takes a very long t

1条回答
  •  一个人的身影
    2021-01-21 03:14

    If it's taking a long time to appear, then it sounds like you're not running this on the main thread, which you should be. Also, if it has prompted once before, it won't prompt again – the user has to go into Settings and enable camera access.

    0 讨论(0)
提交回复
热议问题