Tasker Can't Start Sleep Tracking

Detailed description of the problem:
Hi, I can’t get Tasker to start the “start sleep tracking” command via the Tasker plugin. I verified that the connection between Tasker - disabling it in the SAA app resulted in an error message in Tasker.

Steps to reproduce:

Version of Sleep as Android:
Beta 20191002. I had the issue in the latest public release, and thought beta might fix my problems. It didn’t.

Hello, please first check that Tasker in enabled in Settings > Services… Are you on Android 10? In this case we cannot start sleep tracking screen from background due to new restrictions… so we only start the service and you should see a notification… could this be the issue?

Hello, I am using the Beta as well and I cannot get the Sleep as Android to start via Tasker plug in either. I am on Android 10 and I have confirmed that Tasker is enabled under Settings > Services. In response to your questions to the OP, I have double checked, I do not see anything about Sleep as Android in notifications.

@petr-urbandroid I am having the same issue as @DaveStLou is.

I have verified that Tasker is enabled in settings. As I mentioned in the original post, I have verified that Tasker is sending a command to Sleep as Android because if I disable Tasker in SAA settings, I get an error message in Tasker.

I am a little confused as to what I should be looking for. I understand that things changed with Android 10, but are you saying that sleep tracking should actually be started in the background via Tasker, or that it can’t?

Hello, big thanks for reporting. I think this may be a Android 10 issues… we are still finding little incompatibilities here and there even we have intensively tested everything with the very first release of the BETA a year ago… this time the problem is the inability to start screens from the background… we will prepare a fix… sorry for the issues…

Will you let us know when the fix is in so we can test? Thanks!

Hi, just wondering if any progress has been made on a fix for this? I would be willing to re-join the beta program to provide feedback on any fixes.

Hello, we have tried but non of us is able to reproduce the issue. Can you maybe let me know few more details on what exactly is failing or maybe can you try the steps I did to confirm that at least this is working for you guys too?

  1. Installed taker and created a new Task, there create a new Action - Plug-in > Sleep > Start sleep tracking…

  2. Enabled Tasker support in Settings > Services > Tasker - otehriwse the action shows an error in Tasker

  3. When I try to run the action Tasker asks me to allow it to draw over other apps, I did that (this is now needed on Android 10)

  4. When I just the action after permission is granted sleep tracking starts - a notification is visible - the screen is not visible immediately - you need to tap the notification first to access it…

  5. Than I granted the permission to draw over other apps to Sleep as Android

  6. Now when starting the action within Tasker the sleep tracking screen is shown as if you would press the sleep tracking button…

Many thanks for letting me know… few more details…

Here is a short video demonstrating the problem.

PS sorry for the delayed response - I replied to the email not realizing it would not post to the thread

Many thanks, could you please send a menu report a bug, just after you tap the play button in Tasker?

I sent the bug report via email. I completely closed SAA before running the Tasker task, but since I was unsure that it actually started SAA in the background, I opened SAA and ran it again to be sure before reporting the bug.

Edit 1: add more description
Edit 2: change wording to “Tasker task” instead of “Tasker profile”

Hi, @petr-urbandroid. I am responding to an email from @jiri-urbandroid to say that I am still encountering this issue on my Android device.

Many thanks for the report… the issues is very specific… this is why i was not able to reproduce this… it only happens with sonar and only when phone is not charging… I will prepare a fix…Many thanks for reporting…

@jdevmiller also from the log it seems like the permission to draw over other screens is not granted - strange as from the video you send erlier it seemed like you did grant this for Sleep as Android right?

@petr-urbandroid are you saying that I should have “draw over other apps” turned on for Sleep as Android? I apologize - I misunderstood and was showing the “draw over other apps” to be turned on just for Tasker, and completely forgot that Sleep as Android needs this to be enabled as well.

However, I did turn it on and do another test, and found that the issue persists (as your latest post suggests that the issue is not related)

Hello, could you please try this with this version?
https://sleep.urbandroid.org/wp-content/uploads/release/sleep-20191219-beta-release.apk