S4 S-View Cover automatically unlocks display, how to detect when it's open?

1,047 views
Skip to first unread message

Tercs Gabi

unread,
Oct 21, 2013, 9:03:39 AM10/21/13
to tas...@googlegroups.com
I have two profiles and corresponding tasks that turn off data 5 minutes after display off, then turns data on again after the display is unlocked.
However, the S View Cover uses a Hall Sensor, which cannot be detected in Tasker, which unlocks the screen when the cover is on, so it can display information about incoming calls and messages.
Can anyone point me to the correct direction to go, so that data is not turned back on when the cover is set, but does so when the cover is open and the screen is turned on? I've tried to add proximity as an event for data on, but then it will not detect when I flip out the cover, since the whole event will not fire again, since the screen is already unlocked.
Any help would be greatly appreciated.

P.S. Pent, is there any chance that the Hall Sensor will be added to the sensors detected by Tasker?

Brandon Horwath

unread,
Oct 21, 2013, 11:33:54 AM10/21/13
to tas...@googlegroups.com
I've tried to add proximity as an event for data on, but then it will not detect when I flip out the cover, since the whole event will not fire again, since the screen is already unlocked.

Try as exit, not entry task instead.

Joseph Richman

unread,
Oct 21, 2013, 1:23:31 PM10/21/13
to tas...@googlegroups.com
The effects of a hall sensor could be "recreated" using a magnetic field sensor. The case has a magnet in it, when that magnet is against the phone the detected magnetic field would be great than normal. However the small issue with this is if the case folds back around and pushes against the back of the device you could see those same jumps which could lead to the phone thinking it's closed.

I couldn't tell you the exact location but somewhere in the FS will be a file the specifically indicates what the Hall Sensor status is. If you could find the location of such a file you could then have tasker read it and set it to a variable.

Tercs Gabi

unread,
Oct 21, 2013, 3:39:11 PM10/21/13
to tas...@googlegroups.com


2013. október 21., hétfő 17:33:54 UTC+2 időpontban Brandon Horwath a következőt írta:

Try as exit, not entry task instead.

Could you please elaborate, I don't quite understand what this exit task would look like, and what would fire it?
 

Brandon Horwath

unread,
Oct 21, 2013, 11:10:49 PM10/21/13
to tas...@googlegroups.com
In the profile tab, long press on the task for the profile.

If using appropriate contexts the submenu that appears will have an option, 'move to exit'. Select that ;-)

Tercs Gabi

unread,
Oct 22, 2013, 2:18:24 AM10/22/13
to tas...@googlegroups.com
Sorry, I wasn't quite clear. I know what an exit task is and how to set it up, but I didn't see what exactly should be the profile where this exit task should be, and also what it would contain. Thinking of it more (a good night's sleep helps :) ), do you mean to set up a profile for the proxy sensor alone, and set the data on task as an exit task for that. Wouldn't that be draining the battery, in which case I might as well have the data kept on, too?
Right now what I have is a profile that is turned on only to check the proxy sensor status, then is turned off by the same task. So it doesn't keep the proxy sensor awake.

Brandon Horwath

unread,
Oct 22, 2013, 8:37:19 AM10/22/13
to tas...@googlegroups.com
Right now what I have is a profile that is turned on only to check the proxy sensor status, then is turned off by the same task. So it doesn't keep the proxy sensor awake

Then you gotta decide, do you want to be able to monitor the proxy sensor or not?

Unfortunately, even with tasker there is no way to have your cake and eat it too.

Bastian Stegmann

unread,
Jun 10, 2014, 6:52:46 AM6/10/14
to tas...@googlegroups.com
Tasker cannot detect the hall sensor, but there is a workaround. Tasker can intercept the samsung intent, which gets broadcasted when you open/close the s view cover.

Here is my profile which sets %SView to 0 when the cover is open and to 1 when it is closed. You can use this variable in your profile as a state context.

Profile: S View (320)
Event: Intent Received [ Action:com.samsung.ssrm.COVER_OPEN Cat:None Cat:None Scheme:* Mime Type:* ]
Enter: S View (322)
A1: If [ %coveropen ~ true ]
A2: Variable Set [ Name:%SView To:0 Do Maths:Off Append:Off ]
A3: Else
A4: Variable Set [ Name:%SView To:1 Do Maths:Off Append:Off ]
A5: End If

Hope this helps.
Cheers

Craig Trunzo

unread,
Jun 13, 2014, 4:24:06 PM6/13/14
to tas...@googlegroups.com
Let, that is awesome. It works great.

Do you have any idea if there is an intent that can tell when the cover is closed, if the screen is on or not?

Scenario is I have a profile that runs when the screen is on, but locked. It doesn't activate if you hit pwr or home with the cover closed.

What I'm trying to get is the intent that tells the phone to show the clock or whatever when the sview cover is closed and a button is pressed.

Craig Trunzo

unread,
Jun 14, 2014, 8:54:27 AM6/14/14
to tas...@googlegroups.com
I was able to use your method, along with the Screen On/Off/Unlocked contexts to do exactly what I want.

More detail.  I use Nova which now has OK Google built into the launcher.  The problem is that it doesn't work on the lockscreen or with the screen on when an SView cover is closed.

I had previously made a Profile to turn AutoVoice Continuous on if the screen was on but locked.  Using the 3 contexts mention above, I set a variable, %Display, to Locked, Unlocked, or Off.  I was able to use your method to set a variable, %SViewOpen, to true or false.
The phone considers the screen unlocked when you press a key with the cover closed, not locked.

My profiles are:
1: Variable Value: %Display=Off  (turns AVC off)
2: Variable Value: %Display=Locked (turns AVC on), Exit task turns AVC off
3" Variable Value: %Display=Unlcoked AND Variable Value: SViewOpen = false (turns AVC on), exit task turns AVC off


The end result is that with the display on and unlocked, Nova handles speech with "OK Google"
Display on but sitting at the lock screen, AVC turns on and listens
SView closed but a button pressed to the clock shows in the sview window, AVC turns on.
Screen off and AVC is off.

David Erdman

unread,
Dec 30, 2014, 11:13:01 AM12/30/14
to tas...@googlegroups.com
This doesn't seem to work for me, how does it know the status of %coveropen? Where did that get set or is that received from the intent? 
Reply all
Reply to author
Forward
0 new messages