yashsingh1/xdaforums huggingface dataset:
[Eee Pad Transformer General] Ciela:
Of course :) planning on making the duration of the timers (at least slightly) configurable as well.

I want to have this working entirely with broadcast receivers & alarms, without the need to have a service running on the device (and therefore no extra icon on the notification bar).

Haven't actually got it toggling airplane mode properly yet, but the app is being triggered correctly for the screen on & off events, as well as the alarm every 30 minutes while the screen is off... at least while connected via USB with me monitoring logcat via ADB.

My main concern with this is that the screen on/off broadcast receivers have to be registered programmatically (not via the application manifest), and Im not sure if the Android OS is smart enough to still wake the app for these if the OS has previously killed the application to free up memory for another app. I suspect this may be why the existing Auto Airplane Mode app that a lot of us are using is running a service.

I used to do that, but would forget at times to put it on airplane mode when I did want it. If I get my app working properly, it would be trivial to change the initial disabling of airplane mode to take place at, for example, 30 minutes or more after locking the device (if you have left it alone for 30+ minutes, it is fairly safe to assume that you are done using it for a while). Technically it would also be possible to alter it to only trigger if the screen has been off for a set time AND it is not currently connected to your home/work/phones wifi access point), but that's getting a bit beyond the scope of what Im after. Would be more than happy to provide the source to others to change as they please though
[Eee Pad Transformer General] leonpr:
I didn't see your last group of posts about having a program that turned airplane off ever 30ish min to allow for updates. If you created an app that did this (maybe configurable to saying when to turn off and for how long) that would be awesome :)
[Eee Pad Transformer General] cezz_:
Can't wait to get the app, sounds cool even if we won't get fully working deep sleep as a result.
[Eee Pad Transformer General] ivan.volosyuk:
I did it using Tasker. Works really good. Battery live is awesome.
[Eee Pad Transformer General] Beards:
Ciela,

How is your App coming along and when do you think you will be at a release stage?

Don't forget you can release BETA versions if you require testing by other members.

This is by far the better method as you then receive multiple feedbacks based on actual use before final release.
[Eee Pad Transformer General] Ciela:
It looks to be working fine but I want to test it out over a longer period than what I currently have been. Radios are getting disabled and re-enabled at the right times and push notifications have come through (confirmed by sending a notification through while the device is locked with radios off, waiting until after the 1-minute enabling, then unlocked device and an app I pushed from the market web site was already installed :)

I have found that, if Android kills the app, the intent receivers never fire for the screen on/off events (as they are registered programmatically). I have set a flag in the application manifest for the app to not be killed where possible, but I haven't done a lot of testing to see how well that will work yet. I also haven't made any of the timers configurable yet (will be easy enough to do though, will slot right in with the existing code).

--- but ---

A new version of Prime ROM is out now that is supposed to fix the issues with deep sleep and wifi. I've just flashed it now to see how it goes. Doesn't mean I am stopping with this app though, but Im going to see how the fix included in Prime goes (though that won't help users of other ROMs of course, especially for people with unrooted devices)
[Eee Pad Transformer General] Beards:
Thank you for the update. Sounds very promising....

As you are aware, having the App associated to other ROM's is only going to cause you all sorts of issues and setbacks.

There are a lot of users (myself included) who for various reasons have not changed to any other ROM than what Asus push out.

Regardless, I for one am looking forward to seeing your App.
[Eee Pad Transformer General] Ciela:
I've uploaded the current build of it for you if you want to give it a try. The UI is VERY basic, and it does not yet start when the device boots. You have to manually open it and press start :) The "Query" button is something Im using for debugging with ADB and can be ignored :)

Once having pressed the "Start" button, you can switch out of the app. From there, the app will monitor the screen on & off events and will toggle airplane mode appropriately. All timers are still hard-coded.. turning off your screen will start a 1 minute timer, after which airplane mode will be enabled. When the device is sleeping and airplane mode is enabled, new timers will be set to disable airplane mode after 29 minutes, and then enable it again 1 minute later (so each "cycle" is 30 minutes - 29 off + 1 on). Turning the screen on again will disable airplane mode and WiFi should automatically reconnect to known WiFi access points.
[Eee Pad Transformer General] Beards:
Sounds all good and straightforward enough.... Nice one.

I have downloaded and will install sometime during the day. I'll let you know tomorrow how I got on. :)

Thanks added.
[Eee Pad Transformer General] Ciela:
Looking forward to hear how it goes. Im still not 100% sure if the app is going to work correctly without a service running constantly (just like Auto Airplane Mode app does).. want to avoid the service if possible but it might be a necessity.
[Eee Pad Transformer General] Beards:
Well, I ran it from yesterday evening til this morning.

Before I started the App I had Wifi running.

I started the App around 6PM and let the screen go off.

I turned on the TF around 9PM checked the Battery stats and it showed Wifi had remained on constantly and had been Awake for most of the time.

At around 11PM I again let the screen go off and left the TF for the night....

This morning I turned on the TF screen, went straight to the Battery Stats and noticed Wifi had remained on constantly and showed the TF being Awake again for most of the night.

Unfortunately for me it does not appear to have done anything.

One thing I noticed is when you load the App, no matter which item you select ~ be that Start, Stop or Query the App does not show it has actually responded, so you are left wondering if it is doing anything?

I'll hand it back to you for your comments Ciela. :)
[Eee Pad Transformer General] Ciela:
Interesting. As I said, it's still not complete, but I was honestly expecting it to work a bit better than that for you! lol

The buttons print output to the device logs, viewable via adb & via apps that read device logs, so I hadn't added any on-screen notification of it being active (apart from currently when you unlock the device it SHOULD say that airplane mode is being disabled)

Testing locally had showed WiFi turn off correctly though. With ADB running logcat I was able to see when the app was switching airplane mode on and off, and pinging the device would see the ping replies cut out right when the app enabled airplane mode (and pings would resume when turning the screen back on). Turning the screen on and unlocking it quick enough also shows the WiFi currently disconnected and starting to reconnect.

I'll have a look into the method Im using to enable/disable airplane mode and see if there is an alternative method for doing so, and give that a try. I'll also add a small message for starting/stopping the screen on/off event receivers, and see how that goes.

Question: Does turning WiFi itself off, can your device then enter into a deep sleep? I've written a small app in the past that can toggle WiFi successfully, so maybe if I try toggle WiFi itself rather than Airplane mode it could work better
[Eee Pad Transformer General] Beards:
Thanks... Will keep an eye out for when you have any further updates.

Re Wifi turning Off ~ This morning I left the App running turned off Wifi manually and powered down the screen for 1hr.

When I woke the TF I checked the Battery Stats and yes wifi remained off but the TF did not enter any deep sleep.

I had a look to see if there were any other Apps preventing deep sleep (although I would have hoped your App would have terminated them) and found none.

Stopping your App with Wifi remaining off for a further hour did not make any difference.

One point I must pass on is since Honeycomb 3.2.1 I have not been able to select anything other than 'Never' for Wifi Disconnection Policy. Selecting either 'Never when plugged in' or 'When screen is turned off' only ends up with wifi continuously trying to connect ( a well known bug to a number of TF owners as I am sure you are aware).

I am wondering if this 'bug' may have something to do with the fact wifi will not disconnect unless you select it manually.

Even so it does not explain why the TF will not enter deep sleep or go through any of the selections your kind App should give.

One question, would it be feasible to show on the Tablet your App is running?

I don't have ADB nor any other information utilities other than the stock ROM's and Firmware updates pushed out by Asus (my business usage prevents me from altering any aspects outside of Asus on the TF).

Thank you again for your continual development.
[Eee Pad Transformer General] Ciela:
Hmm not exactly what I was hoping to hear. I just did a build with it turning WiFi off only, testing locally looks to be working for this but if it doesn't let the device enter deep sleep then it would probably be useless. Have uploaded the APK with this post anyway in case you wish to test it just to confirm.

I've always had my Transformers WiFi disconnection policy set to "When screen is turned off", have seen the WiFi on/off bug a handful of times but not really that many (at a guess, 3 or 4 times total I have seen it).

Just wondering, before you install the new build, could you try setting your WiFi policy to "when screen is off" and test to see if the device then enters deep sleep and the WiFI radio goes off?

ADB doesn't require any changes to the stock ROM :) Personally I am hoping to avoid running a service on the device, might be able to look at having an ongoing notification without a service running (or even a once-off notification whenever the app is enabled).

I probably should flash back to an earlier version of Prime so that testing locally is easier, though have had bad experience with CWM recovery on this device previously (my nandroid backup only contained bits and pieces of my data partition.. restored some stuff such as known WiFi networks, my wallpaper, etc.. but didn't restore anything else) and want to avoid any potential headaches to do with that.

Updated APK is attached below... this one also includes a Toast pop-up type notification when you press start and stop buttons :)
[Eee Pad Transformer General] Beards:
Thanks.. I'll have a look at this new App later.

As I mentioned previously, when I select in the wifi disconnection policy anything other than 'Never' the Wifi will not restart.

I tried it again and Wifi turned off when the screen was shut off. Trouble is though as previously mentioned the wifi would not restart, continuously paging.

Because I know this is an issue with my TF I have returned my unit this afternoon back to IT and have just picked up a new replacement.

Over the next few days I will get this new TF up and running and will try your new App then.

Thanks... Yes, I'll give this new App a test in the next couple of days and get back to you.

All the Best

Beards
[Eee Pad Transformer General] xyellx:
Here is my story:

B50 Tab + B70 Dock.

Prime >1.6: Touchpad will alway wake the tab, even if nothing is running.

Revolver <3.5: Touchpad will NOT wake the tab, except your listing to music and things alike.

So for me Revolver fixed everything, please note i had also a very good battery life with Prime. (Deepsleep is working with both ROMs)

++ for both Roms, keep up the good work.
[Eee Pad Transformer General] bosotros:
After having the same problems since the last update, battery drain and never going into deep sleep, I tried a hard reset. The problems disappeared. It also fixed the external storage issue and the swipe of the touchpad waking the screen.

I was pretty sure I had done a hard reset after the update but apparently not.

I have stock B50 tablet and dock
[Eee Pad Transformer General] Tuborg68:
Interesting... How do you do a hard reset? Is that the same as reset to factory settings?
[Eee Pad Transformer General] Mutnat:
I would also like to know what's involved in a hard reset. I've also got a B50, and the keyboard wakes it up even with the power-saving feature turned on.
[Eee Pad Transformer General] Beards:
Well Ciela, I thought I would come back and give you an update.....

Since my last message to you I have returned my original TF and had a replacement from IT so here's how I got on with that one...

The very first thing I did before adding any information and Apps was to test the Wifi Disconnection Policy and guess what... just like my first TF the second did exactly the same!!! Changing it from Never to When screen is turned off gave me the same problems in that as soon as you switch back on the screen all you get is a continuous pinging as the wifi is trying to connect.

Only option there is to power down, restart and quickly change the policy to Never otherwise it repeats it's continued attempts.

Afterwards I did try both your Apps but still no joy.

Although the first App puts the TF in Airplane mode and wifi appears to be off, when you check the battery panel it shows wifi has remained on and the device never slept.

The second App I like the fact it gives a message informing you it is operational and showed it turned wifi off when the screen was off but again the battery panel shows different.

Believing the problem is to do with the wifi policy I went back to IT and got them to give me a third TF.

Powered it up, set up the basics, went straight to the policy and changed it to When screen is off. I then turned off the screen, restarted it some 30mins later and I simply could not believe me eyes...... Here I was with the third TF and this one was also pinging the wifi relentlessly not connecting.

Three TF's and all of them have this wifi policy issue... Unbelievable, bloody unbelievable. The problem must be associated with this batch we have.

Anyway, I did try again your App's but no joy I'm afraid. TF simply will not go into deep sleep.

So thanks, appreciate the Apps. I'm more than happy to carry out any further tests for you. Just let me know but if you want to call it a day and concentrate on other things I understand fully.

Beards
[Eee Pad Transformer General] Ciela:
Sorry for the slow reply, just got home from hospital, won't be able to do any work on the app for the next couple days at least as the pain killers Ive been put on are making me dizzy and cant think straight

I doubt there is anything in the batch of units that you have as the issue is a software one. Apparently Asus have recognised the issue now and have said that it will be fixed in the next update (I dont have a source for that sorry, read it on another forum I think). I have had the wifi on/off bug a few times before but not to the extent that you have, and it is something that was fixed in Prime ROM, hopefully it won't take Asus long to get a fix out.

That said, I'm unsure as to why the app isn't disabling wifi properly for you. There may be something wrong with how I have been disabling it (and enabling airplane mode), although the wifi disconnects correctly in local testing. I am happy to post the full project source though if anyone wants to have a look into it
[Eee Pad Transformer General] Beards:
Many thanks in coming back Ciela, I do hope whatever your hospital visit was for you are on a recovery.

Pain can be a mammoth battle to fight, I deal with many on a daily basis who have to suffer patiently without yielding. May I ask what pain relief they prescribed?

And so... back on topic.

That was interesting news you mentioned from Asus. I was not aware they saw admittance to the issue. I'll have to do a little digging to see if I can recover any further material on this.

As to your App, should you be in a position at a later date to offer any further information please do keep us informed. I for one would be most willing to further test it for you.

All the Best

Beards
[Eee Pad Transformer General] fldude99:
Does anyone think an Asus update is even in the works? With ICS around the corner, I would think that is the next "update"
[Eee Pad Transformer General] abhayy:
id imagine they'd release the tf2 with ics and release ics for the tf a few months later...
[Eee Pad Transformer General] boonkui:
Frankly speaking, if Asus does not resolve the current drain problem of TF1 supposedly with an upcoming update, it's hard for them to inspire confidence in many of us that TF2 would not have the same problem. But again, they might have to divert most of their developers to ICS :(
[Eee Pad Transformer General] Roni1979:
I've found an App which could be responsible for battery drain. CNN for Tablets. I tested it. I deinstalled the App and the Transformer fell into deep sleep. After reinstall the App CNN for Tablet transformer never fell into deep sleep except a Restart. Could anybody Test this solution?
[Eee Pad Transformer General] Tuborg68:
My TF is now ok and goes into deep sleep. Not sure how / what i did. But maybe two hard resets did the trick. Or auto airplane mode. Or the new version of dual battery widget.

No drain in last 48 hrs. Dock is attached.

Btw: i have the cnn-app installed.
[Eee Pad Transformer General] zillah1985:
I can't seem to get it to consistently hold. Usually I have to restart my TF before this app begins to work. But it won't work consistently. If I plug it in, detach my tablet, not turn the screen off manually, and even close it while the screen was on, it will break the airplane mode app and the only way to get it back is to reboot. What is the point of doing that, really? The difference between whether it works or not is so stark, we are talking a diagonal vs horizontal graph lines in the battery loss department. It is just so frustrating...
[Eee Pad Transformer General] Bob Smith42:
Frustrating. I agree.

I was charging my tablet, while disconnected from dock. The screen would not go to sleep. I set it to sleep after 15 seconds. Not working.

So I changed the brightness to AUTO and now sleep works while charging.

Why does the Tablet NOT SLEEP while charging if brightness is manually set (not auto)?
[Eee Pad Transformer General] blessedswine:
dont have that app and it still doesnt sleep, hell i deleeted everything and it still doesnt sleep.
[Eee Pad Transformer General] caveman999:
I'm not sure if this will work for you, but it has worked for me multiple times. I often notice that my transformer stops going into deep sleep after I upgrade the firmware. To remedy this issue, I back up all of my files onto my microsd card using titanium backup and wipe everything using the super wipe script provided by the developer of the Android Revolution ROM. I then flash the full version of the ROM that I want to install (not a full version then an update, just the most recent full version) and reload all of my data.

Hope this helps
[Eee Pad Transformer General] DevCake:
+1

Awesome find. One of my gripes.
[Eee Pad Transformer General] tennvol12345:
Over the last few days I have started to experience the battery drain issue. Ive followed this thread pretty closely and have verified I have no running apps causing the tablet to wake. I also have auto airplane mode installed. Just recently my tablet restarted itself but didn't do a full restart, ie asking me to enter my password (tablet is encrypted), it just flashed to the asus logo with the spinning circle and then went to my home screen.

B60 tablet, not rooted, anyone else have this happen to them?
[Eee Pad Transformer General] 8ball79:
Since I updated to new dual widget version I have no battery drain. For me the problem seems to be solved :-)

But this is what I don't like about Android: Every programm can change the the energy management or the cpu activity. Will this be better with windows phone?
[Eee Pad Transformer General] dkolody:
As read in previous posts, rebooting does the trick for me.

After I charge, the problem comes back.. Repeat reboot..all is well again. Kind of annoying but not a big deal now that I know how to fix it.
[Eee Pad Transformer General] Tuborg68:
+ 1 on this! Once I found this out the power drain aint no biggie for me any more.
[Eee Pad Transformer General] *Detection*:
Does anyone have the APK for this, it has been removed from the market for some reason
[Eee Pad Transformer General] Korumera:
I would love the have the APK also. Its been removed from the market and i forgot to backup it :(.
[Eee Pad Transformer General] dougstoner:
Yeah, its been removed from the market. Would be awesome if somebody could post the apk.
[Eee Pad Transformer General] KaliKot:
Are you guys sure? I clicked the link and it brought me to the page
[Eee Pad Transformer General] dougstoner:
The link is working now. :)
[Eee Pad Transformer General] chat2004:
My TF have the same problem, never deep sleep. I installed auto airplane but nothing change (lastest update fw 8.6.5.21)
[Eee Pad Transformer General] deio:
Doesn't it block network access? If so it's an useless app. I use Yahoo often and I don't want to miss a message :) Am I wrong?

I have the 3G version with WiFi off in sleep
[Eee Pad Transformer General] stcardinal:
How do you get back on wifi? Everytime the device goes into airplane mode I can't connect to my wifi. I end up having to reboot my router EVERY SINGLE TIME.
[Eee Pad Transformer General] funky_snowman:
if you haven't tried a factory reset, thats what fixed my sleepless tf101.
[Eee Pad Transformer General] chat2004:
I tried, but nothing change, still not sleep...
[Eee Pad Transformer General] GrijzeGeest:
I used tasker also, attached the 3 profiles I use. Combined with wifi always on, a lock screen timeout of 30 sec and a lock pattern.

Wifi off:

- starts when the screen turns on

- waits 1 minute

- checks if screen is still off, if yes:

- turn on airplane mode, turn off sync

Wifi on

- upon unlocking turns off airplane mode and turns on sync

The variable %Screenstate is set for the background check profile below

Background check

- stop if screen on

- turn off airplane mode and turn on sync

- wait 5 min

- stops if screen is now on else:

- turn on airplane mode and turn off sync

It does this every half hour between 6am and 1am next day unless battery is below 15% or the screen is on.

Works well for me, very low idle battery usage and no problem with deep sleep.