[Nexus 7 Android Development] jimmng:
Through hours of experimentation with my nexus 7,

It conflicts when:

- powereventmgr ACTUALLY detects ac power loss and prepares into deep sleep mode

- tasker: system lock on power loss

When this conflict occurs ( because on my device powereventmgr does not work sometimes so I need to use tasker): -the device screen turns on

-but, either one of these following occurs:

1) device does not detect power

2) device screen turns on but usb dac does not turn on. sometimes airplane mode stays on as well.

the above two examples are well documented by other users if you go through 400 pages in the forum post about Timur's usbrom.

Yes, I understand it turns flight mode on, but it doesn't turn screen back on after ac power detected ( as said in first response )

I know this is kind of a personal app and you're just sharing with the community, but it has issues that need to be solved or else the community of people would be all scratching their head for hours and weeks on end trying to figure out what the hell is going on (like me).

Also, I have been using purity rom since thinking that it was usbrom's fault for not being able to reliably enter deepsleep on ac loss and wake up on ac power. anyway, something VERY interesting has occur. When I started using purity ( with kangaroo kernel), I would constantly test my usb dac with a y-otg cable.

-It would charge the tablet and power the USBDAC when ac power detected

-It would turn my screen off/deepsleep and dac off when ac power not detected

And this would work EVERY time i turned the power off and turned it back on. NO problems.

Now, this is where it gets interesting, last week (thinking it would actually work this time) I installed the latest powerevntmgr ( i believe 1.6 or something yes?), it did not reliably deepsleep etc.

-I had fixed mode and firm sleep on.

-Uninstalled it, and restarted:

-power detected: the usb dac powered, screen on.

-power not detected: usb dac off, screen off. perfect, back to normal.

However!, when I switched the power back on, the device couldn't detect ac power! dac didn't turn on as well!

Now it's stuck being not able to detect power EVEN though powereventmgr is uninstalled.

I have found out that ac power is only detected IF I re-plugged the micro usb.

very very frustrating and confusing. Thanks for the quick replies guys. I really don't want to buy a $250 ipad mini.

Jim.

---------- Post added at 05:32 PM ---------- Previous post was at 05:18 PM ----------

In my tests on jellybean ROMs and kitkat ROMs.....it does function properly, in the same manner as Timur's version. It grabs audio focus using the code from bobd, the same way Timur used bobds code. It DOES turn on airplane mode in screen off and it DOES turn it off with screen on. IF fixed install mode is on, it also activates firm sleep.

Two things to note...1. Crue's app does NOT implement firm sleep, the kernel does

2. Crues app only turns firm sleep on and off, but it is completely disabled if fixed install mode is off.

There are KERNEL level wakelocks that could be present, but it blocks all ROM level wakelocks.

If you don't use fixed install mode, then in kangarom I added a wakelock blocker so you can still force your tablet to sleep.

You can also use Timur's version of pwrevntmngr, it works too. Just pull it from usbrom and push it to /system/app. I don't know about the tasker function, but for me all other functions of crue's version seem to work as intended. Fixed install mode must be ON though.

To crue: i will have a test kernel for you in a day or two. I hope crash issue is fixed.[/QUOTE]

First of all, pretty sure kangaroo has firm sleep. Out of many times turning off ac power, I do see the "preparing to deepsleep" screen.

Also, I've tried it on timurs usb rom, same results. Aeroplane mode does turn off and on but it sometimes gets stuck in the 'on' position.

Could you explain wakelocks please? what does it do and how does it affect the device?

But yeah, read my reply to crue, using tasker any kernel and any rom will have these " not turning screen off" and "not detecting power" problems.

I also use deepsleep battery pro. would that conflict?

thanks for the replies.

jim.