function getLaunchIntentForPackage fails when screen turned off, any reason why?
http://automagic4android.com/flow.php?i ... b92a6bb987
Flow not working correctly when screen turned off?
Moderator: Martin
Re: Flow not working correctly when screen turned off?
I don't know much about java, very confusing especially when there is a nested function applied to the previous object. It seems you want to get the package name or app name. You can use Action Init Variable Package Info. See if there is something you can use there.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Flow not working correctly when screen turned off?
Hi,
I don't see why the function should fail and it seems to work on my device when screen is off. How does it fail on your device? What's the error message?
Regards,
Martin
I don't see why the function should fail and it seems to work on my device when screen is off. How does it fail on your device? What's the error message?
Regards,
Martin
Re: Flow not working correctly when screen turned off?
it returns null when screen is off, but works when screen is on
Re: Flow not working correctly when screen turned off?
Probably Automagic is group into optimized battery list. You have to whitelist it from the battery optimization. Try to create a wakelock too to see if it is the cpu cycle problem. Create a blank flow, use action sleep 1 minute, keep awake, execute it manually (to create a wakelock for the next 1 minute). Trigger your display off flow and see if the function return a proper value.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.