Charged, but still on power

208 views
Skip to first unread message

Matt R

unread,
Feb 9, 2013, 1:55:11 PM2/9/13
to tas...@googlegroups.com
Does your phone no longer show that it's charging? If not, you'll have to get creative. Maybe detect that the phone has been picked up to indicate that it's no longer on the charging pad?

Matt

Daniel

unread,
Feb 11, 2013, 6:14:29 AM2/11/13
to tas...@googlegroups.com
The phone is still indicating that it is connected (the battery indicator shows a lightning bolt symbol) but Tasker sees it as On Battery. I have discussed this with Pent via email and he has concluded that this is an Android bug, unfortunately :(

Like you said, I need to find a way to check whether the phone is on the charging pad or no. The problem is tho, if I have the sensors set to be monitored then the phone is connected (in Tasker settings), since i don't want them to compromize the battery life, they will turn off when the phone is fully charged, and I wont be able to use them (for example accelerometer, in this case) to detect if the phone is picked up.

I would be very thankfull for any ideas on how to work around this issue!

TomL

unread,
Feb 11, 2013, 8:39:49 AM2/11/13
to tas...@googlegroups.com
Rooted phone?  You can run the shell command:

dumpsys statusbar

and examine the contents to detect if the battery indicator shows a lightning bolt or not.

Tom

Daniel

unread,
Feb 11, 2013, 8:57:19 AM2/11/13
to tas...@googlegroups.com
Thank you, but not rooted, unfortunately. 

TomL

unread,
Feb 11, 2013, 9:07:39 AM2/11/13
to tas...@googlegroups.com
Try this shell command, you don't need root for this one:

dumpsys batteryinfo

... on my Droid3 Gingerbread, the first few lines of output show:

Battery History:
-1h53m 100 03c20040 status=discharging health=good plug=none temp=220 volt=4178   etc etc etc.

Tom

Dave Fisher

unread,
Feb 11, 2013, 9:07:28 AM2/11/13
to tas...@googlegroups.com
How about something like:

* Set a variable when plugged in.
* Start monitoring sensors when variable is set.
* When phone moves, clear variable.
* Sensor monitoring will stop.

I've never used sensors etc in Tasker, so no idea how you detect the movement, but something like that should work. Possible issue:

* Phone vibrates for some reason, will think its moved, and stop the monitoring ?

Might open up some other avenues for discussion anyway :)



--
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.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Daniel

unread,
Feb 11, 2013, 9:17:14 AM2/11/13
to tas...@googlegroups.com, mob...@the-darkside.co.uk
Hi!

The problem with this is that the accelerometer would constantly need to be monitored, even when the phone runs on battery (since this is what Tasker thinks, when the phone is fully charged) and that would hit the battery pretty hard, I think.

Matt R

unread,
Feb 11, 2013, 3:30:48 PM2/11/13
to tas...@googlegroups.com, mob...@the-darkside.co.uk
No, it wouldn't.  Dave explained what I was also suggesting.  When the phone is plugged it, you can change the monitoring from preference from "plugged in" to "always".  It will then monitor until movement is detected, or it's no longer lying flat.  Then, the monitoring can be automatically changed back to "plugged in".
 
Matt

Dave Fisher

unread,
Feb 11, 2013, 3:37:15 PM2/11/13
to tas...@googlegroups.com
Yes that was my thinking, but looking at the Set Tasker Pref action - there is no way to change the monitoring preference for the sensors unfortunately. I did reply but it went to Daniel direct by mistake, so we had a chat off-list.

That said, I haven't used Set Tasker Pref nor the sensors, so I may well be missing something, as I did only have a quick look.

Daniel

unread,
Feb 11, 2013, 3:38:16 PM2/11/13
to tas...@googlegroups.com, mob...@the-darkside.co.uk
So you are saying that the monitoring preference can be changed by the task? 
New action -> Tasker -> Set tasker Pref, but there is nothing there about sensor monitoring..

Matt R

unread,
Feb 11, 2013, 3:52:36 PM2/11/13
to tas...@googlegroups.com
Same for me.  I hadn't used it myself but I thought it was an option.  The other way of doing it is leaving it to "always" and make sure you include a second context of variable value.  Tasker checks the lower power things first so as long as the variable value context doesn't match, I believe the sensor monitoring won't occur. 
 
Matt

Daniel

unread,
Feb 11, 2013, 4:13:31 PM2/11/13
to tas...@googlegroups.com
Yes, I know, but that second context is the problem. It needs to be aware of whether the phone is on power or not, and for that, we need the accelerometer turned on. So its a bit of a catch 22.

TomL

unread,
Feb 11, 2013, 4:25:12 PM2/11/13
to tas...@googlegroups.com
Daniel, have you tried to see what output you get from the shell command:

dumpsys batteryinfo

You do not need root to run that. That might offer clues as to how to detect wireless charging.

Tom

Rich D

unread,
Feb 11, 2013, 6:01:12 PM2/11/13
to tas...@googlegroups.com

Daniel, I think you might be missing what Matt was trying to explain. There are few different ways to achieve what you are trying to do. It can be done by settings variables in your different profiles And then using those variables in your contexts. However a much nicer way to do this is with the profile active Context. I noticed in your first post you are using the proximity sensor To do something As long as you are on the wireless charger. I would recommend the following 3 profiles. 

Profile 1: Charging Wireless.
Context: power / wireless charging
Task: stop

This first profile is simply here to detect that you have started the wireless charging..

Profile 2: Charging 
Context: Profile Active /Charging*
Context: State / Sensor / Orientation/'Orientation of phone while charging'
Task: Stop

This second profile shows the versatility of the Profiles active context. This profile will not become active or require sensor monitoring until profile 1 is active. Then after profile 1 becomes inactive ( battery is charged) profile 2 will remain active until the orientation state changes IE the device is removed from the charger.

Profile 3: Proximity profile
Context: Profile active  /Charging
Context: State / sensor / Proximity sensor
Task: ' Do Stuff'

Now task 3 will only become active if profile 2 is active ( charging was started and phone is still in charger)  so when the device is removed from charger all sensor monitoring will stop...

I think that should do it.......  :)

Rich...

Trash

unread,
Feb 11, 2013, 8:46:14 PM2/11/13
to tas...@googlegroups.com
How about setting up a new profile... clone your first one and replace the charging context with state-> power-> battery level-> 100%

Daniel

unread,
Feb 12, 2013, 3:46:44 AM2/12/13
to tas...@googlegroups.com
First of all, thank you all for trying to help out, i really appreciate it!

I think I understand what Rich D is saying, I'll give that a try. I think it may be a little wonky, for example when actually putting the phone on the charger. It will probably get into the charging state before I actually release the phone, so it may get canceled out straight away, when i "drop it" on the charging pad. So it may require some timing procedure aswell. But I'll see what I can do.

TomL: I haven't worked with shell commands before (and parsing the results), so I was saving that as a last resort!

Trash: I was thinking that aswell, but the phone stays at 100% battery for a while after I remove it from the charger, during which time the profile would be active, so it wouldn't work in my case. Thanks anyway!


On Saturday, February 9, 2013 2:57:35 PM UTC+1, Daniel wrote:
Hi,

I have the proximity sensor set up to be monitored "When power connected", as I only want it to react when my phone (Nexus 4) is on its wireless charging pad. This is working great while the phone is charging, but as soon as it is fully charged, the proximity sensor turns off. I'm running 4.0b12m, the latest beta I believe.

Could you guys please suggest a workaround for this, until this issue hopefully gets fixed?

Thanks in advance!
Daniel, Sweden

Rich D

unread,
Feb 12, 2013, 4:33:42 AM2/12/13
to tas...@googlegroups.com

I think it may be a little wonky,

Nah... Even if both profile 1 and profile 2 cycle a few times they will both  be true once things settle. The only wonky thing should  be is if you place it on the charger when it is at %100.   It probably will not fire as there will be no available trigger. If this happens too often you may need a manual trigger with a profile named 'Charging manual'  

   

Rich D

unread,
Feb 12, 2013, 4:42:10 AM2/12/13
to tas...@googlegroups.com

Of course I do not think NFC tags have been mentioned as of yet. A tag would work nicely here I believe .....

Rich...

Daniel

unread,
Feb 12, 2013, 7:15:11 AM2/12/13
to tas...@googlegroups.com
Rick, I will try your suggestion tonight, and will update you with the results. This is what it looks like, I hope I have translated you pseudo code correctly. It actually makes sense to me now.

Daniel
Screenshot_2013-02-12-13-09-59.png
Screenshot_2013-02-12-13-10-03.png
Screenshot_2013-02-12-13-10-07.png

Rich D

unread,
Feb 12, 2013, 7:37:14 AM2/12/13
to tas...@googlegroups.com

Wow.... I am NOT use to that new UI look.... I am still on Gingerbread so cannot update to it.

It looks correct however,
There should be an option for you to ' export description to clipboard'   with the old UI You would long press on the profile name / export / export description to clipboard.  This will give you a better description of the profiles to post  if something is not working for you ..

Rich..

Daniel

unread,
Feb 12, 2013, 7:49:04 AM2/12/13
to tas...@googlegroups.com
Problem is... When I get the Orb charger, I wont be able to use "Orientation Face Up" context :p

Daniel

unread,
Feb 12, 2013, 12:18:33 PM2/12/13
to tas...@googlegroups.com
Ok, I just tried it, and it kinda works. When the display is on, and I am in Tasker, I can see the profiles become green when they get activated. When I put the phone down on the pad, the first two profiles turn green (as they should) and the third turns green while I cover the proximity sensor. All good. When I pick up the phone, the first profile switches off. Then I tilt the phone slightly and the second profile turns off. Works perfect.

However, when the screen is off, the behavior is different, and the second profile stays activated a lot longer after the phone has been tilted, like 5-10 seconds. This makes me believe that the frequency in which android/tasker monitor the accelerometer is lowered when the screen is off.
I am making a talking clock, that, when the phone is on the pad and the screen is off, says the time (the pad is on my night stand, so this makes sense =p). With the current solution, it will say the time when I put the phone in my pocket, for example, if I don't take the problem under consideration.

Any ideas how to tweak this?


On Tuesday, February 12, 2013 1:37:14 PM UTC+1, Rich D wrote:

Rich D

unread,
Feb 12, 2013, 5:04:45 PM2/12/13
to tas...@googlegroups.com

> However, when the screen is off, the behavior is different, and the second profile stays activated a lot longer after the phone has been tilted, like 5-10 seconds. This makes me believe that the frequency in which android/tasker monitor the accelerometer is lowered when the screen is off

I did not know that...

>
> Any ideas how to tweak this?

The one thing I can think of would be...
If you max all the sliders out on the 'display time out' action this will keep your screen on. Then there is a tasker add on called screen filter that will dim the screen down to almost black. I believe the screen uses very little power like this but of course I don't think your device will go into deep sleep.. 

I would put the screen time out and the screen filter dim in the entry task of the second profile and then in the exit task, You should only need screen filter --- 100% ( this will disable the screen filter ) and Tasker should reset your screen timeout to what it was before the profile was active.

Not sure if that will work for you..  but it is all I can come up with at the moment....   Rich..

Dave Fisher

unread,
Feb 12, 2013, 5:43:16 PM2/12/13
to tas...@googlegroups.com
> When I pick up the phone, the first profile switches off. Then I tilt the phone slightly and the second profile
> turns off. Works perfect.

> However, when the screen is off, the behavior is different, and the second profile stays activated a lot longer
> after the phone has been tilted, like 5-10 seconds. 

If the first profile is deactivating correctly with screen off, use the exit task of that profile to turn the screen on - then the second should deactivate properly (and if necessary, turn the screen off again in the exit task of the second profile).

If you are anything like me, the first thing I do when I pick my phone out of its dock after charging, is turn it on to check any messages/mail anyway, so it might actually be useful and not just a workaround :)

Rich D

unread,
Feb 12, 2013, 6:03:43 PM2/12/13
to tas...@googlegroups.com

I don't think that will work..

> If the first profile is deactivating correctly with screen off, use the exit task of that profile to turn the screen on

The first profile will be active until the batt is 100% then it will activate again when the battery reaches something like 95% and starts charging. Again( at least that is how I understand the wireless charging)

UNLESS.....   (good you mentioned this dave) the act of removing the device from the charger will trigger the first profile even if the battery is charged... Then we would have something to work with.....  this can be ckeked in the run log.   In the old UI it was menu / more / run log..

Rich...

Rich D

unread,
Feb 13, 2013, 6:59:49 AM2/13/13
to tas...@googlegroups.com

I have seen a few different posts on this topic but do not think I have seen any info on trying the magnetic level. There is a variable and a context available so if the mag field is very stable when in the charger perhaps that could be used ...  It might be worth trying..... Rich..

Reply all
Reply to author
Forward
0 new messages