I have a simple flow which goesSMS receivedStart Quick Video Recorder serviceSMS receivedStop Quick Video Recorder serviceLoop to startThis works perfectly but only when the screen is on. When the screen is locked, the service doesn't start even though the flow log shows it carries out each step. I've disabled every conceivable battery/optimization feature on my Samsung (using Android 11), so I believe this has to do with the restriction on starting services in the background (since Android 9).Is there a way to overcome this programatically in Automate? I tried having it launch the main Quick Video Recorder service prior to the service, but again, that worked only when the screen was unlocked.(I know Automate has its own video record feature but QWR uses Camera2, I'd like to stick with that if possible)Thank you everyone
Thank you both. To use the unlock subroutine, would I copy essentially everything on the right side of the flow diagram?Henrik, I tried your suggestion and get this message: "java.lang.SecurityException: Not allowed to start service Intent (....) without permission not exported from uid ....The app in question does have a running notification. Is there any way for Android security to register this?
I should add that I've had a go with using the inbuilt Video Record function and it works great, no problems launching while locked, so thank you very much for such a robust implementation, Henrik.In an earlier post I found, you (or one of your colleagues) mentioned that you intend to build Camera2 block. Is this still on the agenda? My only problem with the original camera API is it won't let you select high resolution 4:3 formats.Thanks again for all you've done, Automate is definitely the most impressive app I've used in a long time, and so much more intuitive than its competition.
On Thursday, 8 July 2021 at 12:20:13 UTC+1 Ollie wrote:
Thank you both. To use the unlock subroutine, would I copy essentially everything on the right side of the flow diagram?Henrik, I tried your suggestion and get this message: "java.lang.SecurityException: Not allowed to start service Intent (....) without permission not exported from uid ....The app in question does have a running notification. Is there any way for Android security to register this?
On Wednesday, 7 July 2021 at 19:36:14 UTC+1 Henrik "The Developer" Lindqvist wrote:
You're correct, sorry, it turns out I was launching an 'activity class' through the 'App start' block, not a service. I assume the Android 9 restrictions prevent as activity from being launched while in lock screen.Before I stop pestering you, can I please ask a couple of quick follow up questions?1) In some video recording apps, there is the option of breaking a recording into separate files of a maximum size or length, so that a new file is generated every 5 minutes. So for example, a 30 minute recording would be split into 6x5m files, each starting after the last reaches the 5m point. Is this achievable using the 'maximum duration' function in the Video Record block, or must that always end the recording block completely?2) Is a Camera2 block still planned for Automate?Thank you!