Profile deactivates shortly after phone locks or display turns off

85 views
Skip to first unread message

Chris Lothian

unread,
Dec 20, 2019, 11:50:46 PM12/20/19
to Tasker
Hi,

I have a few different profiles which mostly modify the volume of phone ringer, etc which are triggered by Wifi Near states. For instance, while at home at night or at work, these profiles reduce the volume of the ringer. I also have a "default" profile which has a condition that it activates only if none of the other profiles are active and this default returns volumes to normal and does a few other things. Since using Tasker on my Huawei P30 Pro, I've been noticing that when I'm at home or at work, which means the @home or @work profile is active, shortly after my phone locks or displays turns off, the @default profile is getting activated, which is quite annoying as when my phone goes off, it's rather unexpectedly loud. This use to work fine on my S8.

I've configured the settings outlined on https://tasker.joaoapps.com/userguide/en/faqs/faq-problem.html#00 and have also disabled powergenie. To my knowledge, I've given Tasker all the permissions it needs. I can't see anything helpful in the logs because it doesn't indicate WHY the profile is getting switched from unexpectedly, unless there is some other more detailed log.

Please help, I can't use Tasker in this state any longer.

Thanks! 
Message has been deleted

Chris Lothian

unread,
Dec 23, 2019, 2:22:51 AM12/23/19
to Tasker
joa, anyone?

Brenden M

unread,
Dec 24, 2019, 1:47:54 PM12/24/19
to Tasker
https://www.google.com/search?q=huawei+p30+pro+wifi+disconnects+when+screen+off

Check this out. I am not sure, but if the profiles turning off rely on WiFi state, the device's implementation of WiFi might be the culprit.
A brief glance at those search results above, I see that many people have issues with the WiFi being interrupted by screen state, potentially like you are experiencing.

Indeed it might not be Tasker related, or in other words, Tasker may just be responsive to the device's actual WiFi state.

It might be "WiFi sleep to reduce battery drain" intended behaviour or something. Maybe there is a device setting you can switch. If you were rooted, I bet it's ROM dependent.
__
Brenden

On Sunday, 22 December 2019 23:22:51 UTC-8, Chris Lothian wrote:
joa, anyone?

aa6vh

unread,
Dec 25, 2019, 1:43:29 PM12/25/19
to Tasker
Also if the location services turns off (either explicitly or when the device goes to sleep), the Wifi Near profile will not longer be able to be active, if based on the Wifi SSID name.

You might test this and see if Wifi itself remains active. You could do this by creating a new profile that activates when Wifi is connected to anything, then log when the two profiles deactivate.

Chris Lothian

unread,
Dec 27, 2019, 2:53:46 AM12/27/19
to Tasker
Hi, you might be onto something here. I tested a WiFi Connected profile only and it doesn't seem to be switching off now or at least not nearly as much, when the phone is off. As far as the location services being the culprit, I don't know for sure since I can't find any settings that would cause the location services to turn off or goto asleep when the phone is locked out display turns off.

Rich D

unread,
Dec 27, 2019, 5:40:31 AM12/27/19
to Tasker Google Groups Post
You can check the run log to see exactly how many times the profile goes inactive and for how long it is inactive (menu / more / run log), however for issues like this one where most of the time you are not even aware the profile has gone inactive and then active again I will usually just make my own log and write a time stamp to a file to monitor how long it is inactive for.  If the interruptions are short like under a minute or so you could just de-bounce the profiles. Which simply means having the exit task wait for a time period and then check to see if the profile is still active before running the rest of the exit task.


You can search this group for other approaches but this is the one I use. It will stop both the enter task and exit task from running when the context bounces. This example uses a context : state: Cell near.  This will work with any state context. 

Profile: Cell on
Context: cell near
Enter Task: Start7
1. Enter task stuff

<put the following actions as the first actions in your exit task>

Exit task:stop
1. Wait 5 sec <whatever time you need>
2. Stop  <enter task> ;Start
3 Stop if %PACTIVE ~ *,Cell on,*
4. Rest of exit task !

 

Chris Lothian

unread,
Dec 29, 2019, 1:01:06 PM12/29/19
to Tasker
Thanks for the suggestions so far. I don't think this approach will work in this case though since the Tasker is not switching from the @default profile until the phone is unlocked as far as I can tell from the logs. So it seems the WiFi Near state can't work properly when my phone is locked, at least not with this Huawei phone ☹️

João Dias

unread,
Jan 8, 2020, 9:32:42 AM1/8/20
to tas...@googlegroups.com
Hi there.
To make sure Tasker and the AutoApps run in the foreground please check here: https://tasker.joaoapps.com/userguide/en/faqs/faq-problem.html#00

Make sure to check here too: https://dontkillmyapp.com/?app=Tasker

Hope this helps!


   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


On Sun, Dec 29, 2019 at 6:01 PM Chris Lothian <chris.lot...@gmail.com> wrote:
Thanks for the suggestions so far. I don't think this approach will work in this case though since the Tasker is not switching from the @default profile until the phone is unlocked as far as I can tell from the logs. So it seems the WiFi Near state can't work properly when my phone is locked, at least not with this Huawei phone ☹️

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tasker/997e7e99-0927-4fda-a424-e3f1b9bda1c8%40googlegroups.com.

Chris Lothian

unread,
Jan 9, 2020, 12:06:02 AM1/9/20
to Tasker
Hi, I've tried all of the suggestions at both of these pages to no avail. Seems to be something with Huawei, maybe OS related, as it worked fine on Samsung S8. Is there something I can provide you with that may help diagnose the issue further?

João Dias

unread,
Jan 9, 2020, 4:20:39 AM1/9/20
to tas...@googlegroups.com
Are you sure that Tasker is allowed to get your location even while in the background?

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


Chris Lothian

unread,
Jan 10, 2020, 12:53:38 AM1/10/20
to Tasker
Yep, I've given Tasker all the location permissions I could find.

Chris Lothian

unread,
Jan 10, 2020, 12:54:17 AM1/10/20
to Tasker
Is there a way to verify somehow that Tasker can access location when in background?

João Dias

unread,
Jan 10, 2020, 7:23:38 AM1/10/20
to tas...@googlegroups.com
MAybe try disabling and enabling the Location permission for Tasker in Android settings?

Chris Lothian

unread,
Jan 15, 2020, 12:43:22 AM1/15/20
to Tasker
Tried that and no difference.

Do you think it might have something to do with the Always On display which I had set on my Huawei? Or do I need add a Location Mode setting on my Tasker profiles? Or could it need some other special permission like WRITE SECURE SETTINGS?

Qasim Ch

unread,
May 26, 2023, 5:59:08 PM5/26/23
to tas...@googlegroups.com
Does autoinput uses android libraries for ui automation?

On Wed, Jan 15, 2020, 9:43 AM Chris Lothian <chris.lot...@gmail.com> wrote:
Tried that and no difference.

Do you think it might have something to do with the Always On display which I had set on my Huawei? Or do I need add a Location Mode setting on my Tasker profiles? Or could it need some other special permission like WRITE SECURE SETTINGS?

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages