1

I have an app that continually casts the screen so I can capture images that I run through a tensorflow lite model for object detection. On Android 9 I was able to check a box to remember my decision to start the recording of the screen so when I restart my phone I don't have to intervene to start the service . Now an Android 10 and above they've removed that box and you have to tap it to enable it every single time the phone restarts. How can I Ensure that the screencasting automatically restarts whenever the phone is turned off and turned back on in Android 10 and above. Can I use phone administrator to accomplish this?

  • 1
    You know the scrcpy project? It automatically does all the necessary changes for streaming the screen to a PC and it allows recording. It just requires an adb connection. May be this would be an alternative to the app you used before. – Robert Dec 01 '20 at 16:37
  • Thanks for the suggestion Robert. I took a look at the GitHub for this project and it looks like the device has to be attached to a PC or Mac and debugging mode. I'm not sure that's going to help me because my app runs standalone on an Android device and needs to record the screen 24/7. Prior to Android 10 this wasn't an issue like I said because when screen came up and asked to enable capture it had a checkbox that said remember my choice so even when I restarted the phone or the app was restarted it was able to bring it back up again without presenting that dialogue. – Louis Sansevero PA Dec 02 '20 at 04:25
  • Can you please elaborate a bit more why you need screen record 24/7 on a phone not connected to a PC? From my perspective the only use case that comes to my mind would be spy-/malware. – Robert Dec 02 '20 at 07:57
  • Hey Robert, some of the details about what we do is proprietary and I'm not able to disclose it here however I will just say that we monitor the screen and use onboard machine learning and open CV to grab individual images and check them against an ml that we created for specific image classifications. Imagine if you were giving out phones to employees and you wanted to make sure they weren't doing anything other than work on them you could use this app to check for inappropriate texting or inappropriate images in input and output and then it would load them up to a server and report them. I – Louis Sansevero PA Dec 05 '20 at 01:28
  • Up until Android 9 the dialogue that would come up allowed you to check a box that said remember my choice and since the phones would be set up by administrators this could not be changed so even a restore would allow it us to have the app restart screen capture, and that worked fine. Now with Android 10 they don't have that checkbox anymore and anytime an employee turns on the phone they could just ignore it and that defeats the whole purpose of the app. So what I'm looking to do is to have some code that would lock the screen and reset the password or pattern or fingerprint or whatever – Louis Sansevero PA Dec 05 '20 at 01:29
  • The app can detect whether or not the screen capture is running and normally after a minute after restart it usually is now an Android 10 we can notify the administrator that it's not running but without the phone in hand we cannot force the employee to go back into the app and restart screen recording. If we could somehow lock them out of the phone all together that would be ideal. The employee would have to call in and get the new pattern or code and would be written up. And each time the screen lock is reset we generate a new random password – Louis Sansevero PA Dec 05 '20 at 01:31

0 Answers0