Sample Header Ad - 728x90

Set up remote camera monitoring on Android OS without user input

0 votes
0 answers
329 views
Bringing my question over from stack exchange as it was suggested I ask here instead. I'm developing a personal project app (NOT for Play Store) to run on an old pixel phone I have. Here are my requirements 1. On boot, I want to automatically launch my app 2. The app should open a live camera feed and collect images at some interval 3. The app should stay alive indefinitely until a user explicitly kills it 4. All this needs to happen with NO user input Nice to haves, but NOT required 5. The app should be able to function without the screen on Now, I've successfully rooted my device to remove as many hurdles as I can. I got my app to launch on BOOT_COMPLETED, etc. But I'm hitting walls with the camera. I know the camera is not allowed to run in a background service. I was considering trying to force my app to be a system app, but I'm not sure if that let's me use the camera in this way either. The other option is to run the app in the foreground, but that requires a user to explicitly allow it to run continuously or else the OS kills it. But this will potentially trigger and run when I'm away, so I won't be there to hit play. This is all like "spying app 101" stuff so that's probably why Android has put up so many roadblocks. But this isn't for other people. I have complete control of my device and will use it on my own property. I can do whatever custom ROMs people suggest, but I've not worked on any Android OS system code before so I'm hoping not to do that. However, if that's the only way, please let me know if you have any suggestions on where to start. What is best way to achieve my high level goals here? Literally any architecture or strategy to do this is fine so long as it meets my requirements above.
Asked by CJN (101 rep)
Feb 28, 2024, 10:23 PM
Last activity: Feb 29, 2024, 02:27 AM