r/androiddev • • Feb 20 '18

News Android P will Prevent Background Apps from Accessing the Camera

https://www.xda-developers.com/android-p-background-apps-camera/
218 Upvotes

62 comments sorted by

View all comments

49

u/baylonedward Feb 20 '18

Are you telling me that right now apps with camera use permissions can run on background and use it without me knowing? What apps do this?

3

u/iBzOtaku Feb 20 '18

Please someone knowledgeable reply

1

u/ingeniousmeatbag Feb 22 '18

You don't even need an overlay. I've implemented an app in the past that records images then encodes them. You just initialize camera on a service then add a texture for it to render preview on. With the new api you don't even need the preview texture, just add the surface as target for the image taken and its all done. No special permission needed.