[app]Sleep widget (SUPER USER MOD only) - Sony Xperia P, U, Sola, Go

This is a small app I made, that does realy nothing other then call PowerManager.goToSleep.
This is normally not possible as DEVICE_POWER permission is only given to system apps, so will not work unless you have super user mod.
ROM developers can sign it with their ROM key if they wanr it in their ROM. If you sign it to your old ROM, please attach it to a post in this thread and I will add a link to your post.

screenshot @ChikeD?

Pandemic said:
screenshot @ChikeD?
Click to expand...
Click to collapse
LOL,, of a widget?
There you go

ChikeD said:
LOL,, of a widget?
There you go
Click to expand...
Click to collapse
Yeah its relevant how it looks like
and ok lol

what's the utility of this??
sorry for this newbie question.

shadowslifer said:
what's the utility of this??
sorry for this newbie question.
Click to expand...
Click to collapse
Put the phone to sleep.
If I set screen timeout too short it will turn off while I'm reading something, if it's long enough I need to press the power button if I want to save battery, which is not very convenient. so this make it easy to put it to sleep

ChikeD said:
Put the phone to sleep.
If I set screen timeout too short it will turn off while I'm reading something, if it's long enough I need to press the power button if I want to save battery, which is not very convenient. so this make it easy to put it to sleep
Click to expand...
Click to collapse
thanks, so this tool replace the function of the power button?? or is something related to wakelocks?

shadowslifer said:
thanks, so this tool replace the function of the power button?? or is something related to wakelocks?
Click to expand...
Click to collapse
Only the sleep functionality of power button (short press), nothing to do with wakelocks oher then overriding any that are held at the time it is pressed, just as the power button does.

My mom would love something like this. She hates the powerbutton on her P, and I do too lol
I tried a few similar apps from play store, but most of them seemed to drain battery (not going to sleep properly?) or just cause freezes and other funny things. One of them actually completely locked up my One S, forcing me to go into recovery to uninstall it lol
So, question is, will this drain battery or cause funny issues? Or is it simply a 1:1 replica of the powerbutton?
Also, possibly slightly offtopic, but this(or super user mod) isnt working on ICS is it?
Ive been away from android stuff for almost a year now, so most of my devices are quite outdated software-wise

@Goatshocker
As I've said in the OP it realy does nothing, so no battery drain waht so ever.
It will work on (almost) any android version, providing it is "granted" the DEVICE_POWER permission, either by signing it with ROM key or if you have bypass this permission check like super user mod does.
As for the super user mod, it might work if you mod it for ICS yourself, I'll check ICS services.jar.
EDIT: I've looked at ICS services.jar and the code look about the same so I'm guessing you can mod it.

Aight, sounds good.
I found a lot of other interesting stuff that requires JB, so Im gonna go ahead and update it to JB.
Thanks for looking though.

@Goatshocker
A bit OT too, but if you realy hate the power button that much, I have another lil app I made, that turn the phone on waving the hand over the proximity sensor.
This does cause some battery drain, about 3% of total on my phone according to battery stats.
I know there are other apps that do it, but for some reason they hold a wakelock (at least some of them) while mine let the phone deep sleep, and all you need to do to stop it is click it in the notification tray.
It does not require any mod, and should work on any device.

ChikeD said:
@Goatshocker
A bit OT too, but if you realy hate the power button that much, I have another lil app I made, that turn the phone on waving the hand over the proximity sensor.
Click to expand...
Click to collapse
I'd hate that even more, and I'm sure my mom would too. Stuff like that is just begging to cause issues
Nope, a simple "power-button" on the screen is exactly what she needs and wants.
edit: It works fine so far btw

Goatshocker said:
I'd hate that even more, and I'm sure my mom would too. Stuff like that is just begging to cause issues
Click to expand...
Click to collapse
Issues like what? So far the only issue I have is that it is sometime difficult to wake up while in deep sleep.
I don't know what impact it has, if any, on the proximity sensor life time
Goatshocker said:
Nope, a simple "power-button" on the screen is exactly what she needs and wants.
Click to expand...
Click to collapse
But the screen is off, and more than that, the activity(window) that is in front is paused when the creen goes off.
Goatshocker said:
edit: It works fine so far btw
Click to expand...
Click to collapse
You upgraded to JB already?

ChikeD said:
You upgraded to JB already?
Click to expand...
Click to collapse
Yeah I did it yesterday even.

Related

UI glitch we ALL suffer from re: lockscreen/quick wake - video post #10

I'm getting extremely frustrated with the glitch that we all see on a daily basis: quick locking/unlocking of the phone will yield the unlocked screen followed by the lockscreen. How has this not yet been fixed by Google? Does anyone have a workaround? So stupid and unprofessional. It makes me sad :-(
What?
/10chars
Lock your phone then immediately press the lock button again to get to lockscreen. Tell me you don't see the previous screen for a split second before the lockscreen shows up.
Nopes.
/10chars
CaNsA said:
Nopes.
/10chars
Click to expand...
Click to collapse
That's BS. It happens almost every time and on every Android device. It's not long at all, but there's no way that every time you try a speedy lock/unlock that you don't get a glimpse of what's hiding behind the lockscreen. It's the same thing with apps that have lockscreen widgets (like PowerAMP). Sometimes I'll get a glimpse of the stock lockscreen and then the PowerAMP lockscreen widget will show up.
Android seems to have a serious issue dealing with sleep mode and knowing what to do on wake.
well... it doesnt happen on my sgs2, my missus' sgs2 or on my asus transformer.
Whats the big deal anyway?
Try calming down and chilling out..... its only a phone.
CaNsA said:
well... it doesnt happen on my sgs2, my missus' sgs2 or on my asus transformer.
Whats the big deal anyway?
Try calming down and chilling out..... its only a phone.
Click to expand...
Click to collapse
I can GUARANTEE that it happens on your S2. It happened on my HTC Magic, N1 and my current SGS2. Maybe you don't notice it, but it's definitely there. I'm uploading a video now to demonstrate what I mean, including the PowerAMP issue.
FirstNoobToBrickHisPhone said:
Yeah, it happens. But I don't see it as a security flaw, sure for a split second you can access an unlocked screen but after that the pattern lock comes up followed by my widgetlocker screen
This does need to be fixed I agree.
Click to expand...
Click to collapse
Thanks for the USEFUL response! I don't see it as a security flaw either, just a massive unprofessional bug. TBH, it's things like this that are the reason why the iPhone is seen to be smoother and more polished. I don't have an iPhone, so I can't ABSOLUTELY GUARANTEE, but I'm pretty damn sure that something like this would never happen. And don't get my started on "only 1 phone to test on"; this has happened on ever Android device I have owned.
As you can see above, the issue is definitely there. Even if it is for a SPLIT second, it still happens and it shouldn't. And the issue with the PowerAMP lockscreen delaying for nearly 3 seconds should NEVER happen. Hell, I just tried it 15 times straight on my 2nd generation iPod touch, and it didn't happen once.
Honestly, if it takes Android purportedly DELAYING the screen wake by a second just to ensure that this doesn't happen, it's worth it IMO.
I see it when the phone has locked itself but not when I lock it using the power button.
I wonder if because the screen is off before actually locking the new lockscreen is not displayed until the screen is turned back on.
Agree it looks like sh1t when it does it.
Sent from my GT-I9100 using XDA App
FirstNoobToBrickHisPhone said:
Don't want to give anymore ammunition to apple.
Click to expand...
Click to collapse
What the hell has apple got to with this?
Please tell me how Apple could use this in the patent war.
Have apple patented "lag"?
Sent from my GT-I9100 using Tapatalk
CaNsA said:
What the hell has apple got to with this?
Please tell me how Apple could use this in the patent war.
Have apple patented "lag"?
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
I think he just means the "iPhone is better" war.
Not doing it here on KI8. I flashed and did a factory reset, wiped the dalvik cache and re-installed my apps and theres not a single glimpse of the screen under the lock screen.
I use a screen lock widget to turn off and lock the screen and the centre button to wake up the phone.
Trust me when i say it isn't happening on mine, it has done it previously and that's why i started using Widget Locker instead...
Sent from my GT-I9100 using Tapatalk
i just spent the last 15 minutes trying this out on my KI3 custom ROM...not happening, goes straight to the lock screen (believe me, im anal about things...)
I think it depends whats on the phone, what settings are used, the kernel etc...
As its something we DONT all suffer from, will you change the thread title?
And you're following along exactly with how I'm describing? Immediate lock and unlock?
And anyway, I'm talking about STOCK Android without any "help". WidgetLocker/custom ROM isn't stock.
Darkside Agent said:
i just spent the last 15 minutes trying this out on my KI3 custom ROM...not happening, goes straight to the lock screen (believe me, im anal about things...)
I think it depends whats on the phone, what settings are used, the kernel etc...
As its something we DONT all suffer from, will you change the thread title?
Click to expand...
Click to collapse
+ 1
Yes me too, I have nearly burned my fingers off swiping my screen, and power button off. No problems with my K14 stock rom.
Maybe you need to clean up the App Cache, and use a memory booster as well?
Just a thought!
Sorry dont do split seconds .
jje
it does happen for me as well.. but yes only a split second.. i just lived with it.. think of it as a "feature" lol
I agree it happens on every android phone....heck its android lol! When i think of android i think of bugs lol. Again its very minor but u want see it on a apple device. Still love my SGS2 to biiits
Sent from my iphone look a like powered by android!
This irks me greatly, since it seems to have gotten worse on KI3. Has currently annoyed me to the point of trying a stack of different ROMs to see if any of them are better. CM7 is - shame it's not quite at a daily driver level yet.

[Q] Delayed wakeup upon unlock. 4.0.3

Yes, I have searched the forum but only found old posts, nothing pertaining to ICS about this.
I've had this problem since 2.3, and it's kinda annoying.
When I press the unlock button it takes around 2sec for the phone to wake-up.
I thought this was supposed to be fixed in the verisons after 2.3, and now I have 4.0.3 and it's still present.
Anyone else have this problem?
Is it a Google or Samsung problem. Can it be remedied?
Xemaniac said:
Yes, I have searched the forum but only found old posts, nothing pertaining to ICS about this.
I've had this problem since 2.3, and it's kinda annoying.
When I press the unlock button it takes around 2sec for the phone to wake-up.
I thought this was supposed to be fixed in the verisons after 2.3, and now I have 4.0.3 and it's still present.
Anyone else have this problem?
Is it a Google or Samsung problem. Can it be remedied?
Click to expand...
Click to collapse
dose it happens by pressing home button ?
Yup
Sent from my GT-I9100 using XDA
Well if you want, you could stop your phone going into deep sleep and have less battery life
Sent from my GT-I9100
Nah, don't wanna clock it up.
But is this a common problem or just some unfortunate people that have it?
Sent from my GT-I9100 using XDA
I have same problem with any stock or custom rom and is verry annoying.
It's normal. I use CM 9 and I'll hit the home button on my sleeping phone now...and it took around 1 second to wake up.
There isn't anything you can do about it.
As Riz said last month, would you rather your phone deep sleep & conserve battery when you're not using it & take a second to wake up or would you rather have a permanent wakelock & resultant battery drain in order to have it wake up in a few tenths of a second ?
I mean, we are talking about a second here. Not half a minute or something.
Yay! You got a new sig!
It always makes me wonder what people expect with these threads....it's like when you wake a pc up - it isn't instantaneous...and is a second really too long to wait?
Yeah I couldn't resist ;-)
Yep you're right. People do expect too much sometimes, as you said, how long does a PC take to wake up from hibernation ? Phone takes no time in comparison.
Darkside Agent said:
Yay! You got a new sig!
It always makes me wonder what people expect with these threads....it's like when you wake a pc up - it isn't instantaneous...and is a second really too long to wait?
Click to expand...
Click to collapse
I don't think the Iphone has this kind of delay?? The same can be said to other phones too
vhc said:
I don't think the Iphone has this kind of delay?? The same can be said to other phones too
Click to expand...
Click to collapse
next your gonna tell us the moon is made of cheese really
DJBoxer said:
next your gonna tell us the moon is made of cheese really
Click to expand...
Click to collapse
I just see more complaints about this on the S2 more than any others that's all...
cheesy moon sounds good btw.

Power button blunged in?

Sorry people I got no idea what is the perfect verb to put. As you know the power button should be emerging from the phone, but as I chat a lot and close the phone between messages and stuff it became.. "bent" in?
I cant really put pictures at the moment as I have no camera, but the point is, I can't use the phone properly now.. Sometimes when I try to put the phone to sleep it restarts, or pops up the "power menu" (Reboot, power off..etc) . And sometimes when I am using it the backlights just start flashing and bam, the phone reboots alone.. more terribely it sometimes just becomes stuck in a boot loop due to power button restarting the phone over and over again lol ?
So the question isnt really software but hardware, I tried the pin that you use to bring out the sim slot to try and push the power button out, but well.. It doesnt fit. Anyone got any idea what to do ?
Take the cover off and reposition the button.
sixcarnage said:
Take the cover off and reposition the button.
Click to expand...
Click to collapse
Seems like there wont be any other way other than opening the cover. Guess I will just send it to a local shop to reposition.. Shouldn't cost much..
An advice for others, use the swipe2wake if you can lol ..
Is there a tool similar to the IOS's accessibility tool? You know that little box that you press on and you can choose the "Home button" or "Sleep" ..etc?
Ghand0ur said:
Seems like there wont be any other way other than opening the cover. Guess I will just send it to a local shop to reposition.. Shouldn't cost much..
An advice for others, use the swipe2wake if you can lol ..
Is there a tool similar to the IOS's accessibility tool? You know that little box that you press on and you can choose the "Home button" or "Sleep" ..etc?
Click to expand...
Click to collapse
There WAS one, i'll see if i can find what it's called for you....haven't heard about it in at least 2years though.. (it was on the market) but have a look in the application dev section on xda
Lloir said:
There WAS one, i'll see if i can find what it's called for you....haven't heard about it in at least 2years though.. (it was on the market) but have a look in the application dev section on xda
Click to expand...
Click to collapse
Found a recent one, Floating Toucher.. http://forum.xda-developers.com/showthread.php?t=2355373
Its quite similar, maybe not the best RAM optimized, its a bit laggy but should do the trick. For those interested, have fun. and support the developer.
For those who don't know what I am talking about its called "Assistive touch" on the IOS.
Best of luck, thanks Lloir
Ghand0ur said:
Found a recent one, Floating Toucher.. http://forum.xda-developers.com/showthread.php?t=2355373
Its quite similar, maybe not the best RAM optimized, its a bit laggy but should do the trick. For those interested, have fun. and support the developer.
For those who don't know what I am talking about its called "Assistive touch" on the IOS.
Best of luck, thanks Lloir
Click to expand...
Click to collapse
glad i helped? i guess lol
Ive taken it off myself with a guitar pick and its very strong and holds up more than I thought. So its no problem. Also no warranty is voided doing this if I remember.

LG's Knock Code

LG is coming out with a feature that's an evolution to knock on/off. it's called knock code. i like the idea. here's a youtube video they made for it. what do you guys think of the idea and implementation?
Knock Code
What idea? They didn't give away anything in that video... XD
Sent from my phone using some app
se1988 said:
What idea? They didn't give away anything in that video... XD
Sent from my phone using some app
Click to expand...
Click to collapse
guess i have to help you. knock code is supposed to make it so instead of double taping on the center of the screen to turn it on which is how it works now, you can have multiple combinations of knocks to turn on the screen. which is what the hand was trying to show you in the video with all the different combinations. that's where they get "knock code" from. the combinations of knocks is the code.
freebee269 said:
guess i have to help you. knock code is supposed to make it so instead of double taping on the center of the screen to turn it on which is how it works now, you can have multiple combinations of knocks to turn on the screen. which is what the hand was trying to show you in the video with all the different combinations. that's where they get "knock code" from. the combinations of knocks is the code.
Click to expand...
Click to collapse
OHHHHH, i see, all is clear now.
If I can unlock my device faster with knock code than with pattern unlock, and if it's as secure as pattern lock, I say yes please. Give it to me!!
Sometimes, not much, but sometimes my phone doesnt even answer the double knock I give it.
Adding more knocks will not be for me unless they up the sensitivity.
Itchiee said:
Sometimes, not much, but sometimes my phone doesnt even answer the double knock I give it.
Adding more knocks will not be for me unless they up the sensitivity.
Click to expand...
Click to collapse
I agree. But still, the idea is brilliant
Itchiee said:
Sometimes, not much, but sometimes my phone doesnt even answer the double knock I give it.
Adding more knocks will not be for me unless they up the sensitivity.
Click to expand...
Click to collapse
I thought the exact same thing. The question is also how complex the taps can be. Feels like there is a bit of a dangerous balance between having some security and actually being able to unlock the phone.
looking forward to seeing someone port this over to g2. the g pro 2 firmware(F350S) has been released and will eventually trickle down to us.. then someone should be able to port the feature.
Itchiee said:
Sometimes, not much, but sometimes my phone doesnt even answer the double knock I give it.
Adding more knocks will not be for me unless they up the sensitivity.
Click to expand...
Click to collapse
I don't have any problems with knocking on or off and would love to see this implemented for our phones. Or, as someone else has already said, love to see a dev create or port the new app/feature for us.
Here's a link to BGR's article on it: http://bgr.com/2014/02/18/lg-g-pro-2-how-knock-code-works/
Any changes?
Do you think: will be any port of this function?
We can port it, Someone hand over the system dump of the G Pro 2 please.
It's weird how they give the feature to the mini but not the main version
Sent from my LG-D802 using XDA Premium 4 mobile app
Jishnu Surâ„¢ said:
We can port it, Someone hand over the system dump of the G Pro 2 please.
Click to expand...
Click to collapse
Can't wait if you can get it ported that's be awesome. I used your camera mod and launcher Port in,nexus 5. Hopefully this can get ported.
Now we just need someway to get that system dump...
Sent from my VS980 4G using xda app-developers app
For those having problem with the knock on, try double tapping and holding the second tap. It works 99% of the time for me, even when the tap intervals are like 2 second apart!
Itchiee said:
Sometimes, not much, but sometimes my phone doesnt even answer the double knock I give it.
Adding more knocks will not be for me unless they up the sensitivity.
Click to expand...
Click to collapse
tips: Keep your finger at screen after second knock until led light. 100% success with knock on.
tithitoy said:
tips: Keep your finger at screen after second knock until led light. 100% success with knock on.
Click to expand...
Click to collapse
That's what he said:
d3FytH3m1Nd said:
For those having problem with the knock on, try double tapping and holding the second tap. It works 99% of the time for me, even when the tap intervals are like 2 second apart!
Click to expand...
Click to collapse
Sent from my phone using some app
Actually, i've since reset my device and find knock on/off more reliable.
Thank you!
Still not feeling a knock pattern though, but hope it comes out for those who do!
I'd say the best option would be to use the Knock Code combination as a straight unlock, bypassing the lock screen.
OR
Use the Power Button / DoubleTap to turn it on, dump to the lockscreen, where you'd have to swipe or enter a code like normal.
I like just double tapping anywhere though. Sometimes I pull my phone out and it's upside down or I'm using my other hand which would be awkward. I wonder if the taps would be relational to each other vs orientation of the phone. If you had to make sure it was right-side-up all the time, it would get annoying.
its so unique, i want it on my N4
people who sad about double tap; pls look for the cpu undervolting and min mhz values. sensitiviy of double tap (or tapping scrren) related about it
That's one beautiful phone. Hopefully there'll be a VZW variant before too long and I can get a new LG Flex.

A simple new way to increase battery life - would you use this app?

Hi everyone!
I am thinking about making an app that would increase screen on time at lower cost to battery life.
It would do this simply by allowing a user to manually set how long your screen stays in super dim mode.
Whenever your display is about to switch off it dims dramatically for a short time, giving you a chance to reset the dim timer. The app would let you adjust how long this takes.
This is especially useful for tablets, which are a pick-ip put-down device where you often need to switch the screen back on after getting distracted with something, so it would, for example, allow you to set an overall time of 3 minutes, with a period of super-dimness of 1 minute. This will save significant amounts of battery.
Before i commit to it, id like to know if this is something people would be interested in. Please let me know below!
vshapke said:
Hi everyone!
I am thinking about making an app that would increase screen on time at lower cost to battery life.
It would do this simply by allowing a user to manually set how long your screen stays in super dim mode.
Whenever your display is about to switch off it dims dramatically for a short time, giving you a chance to reset the dim timer. The app would let you adjust how long this takes.
This is especially useful for tablets, which are a pick-ip put-down device where you often need to switch the screen back on after getting distracted with something, so it would, for example, allow you to set an overall time of 3 minutes, with a period of super-dimness of 1 minute. This will save significant amounts of battery.
Before i commit to it, id like to know if this is something people would be interested in. Please let me know below!
Click to expand...
Click to collapse
good thinking <> go for it!
once you get famous/rich ---- don't forget i pressed the first thanks
I would use this app as my phone does not last forever. Again, if you get famous don't forget I was the second guy who gave a huge thanks
crullick said:
good thinking <> go for it!
once you get famous/rich ---- don't forget i pressed the first thanks
Click to expand...
Click to collapse
Thanks for your thoughts!
I hope many more people post here so i know i can start without worrying that im wasting my time
PS... i wonder what kind of person would rate a thread like this 1* - all im doing is asking whether people are interested in this functionality. And im willing to make the app in question. Crazy...
underdog_656 said:
I would use this app as my phone does not last forever. Again, if you get famous don't forget I was the second guy who gave a huge thanks
Click to expand...
Click to collapse
Thanks a lot for your thoughts as well. If it takes off ill ask mods to move threads and you two will defo be first forever
I hope that you will be susccesfull
Sounds awesome!!
Any progress with the app
underdog_656 said:
Any progress with the app
Click to expand...
Click to collapse
Ill need more people to voice their support before i start...
Sounds good, so I think it already exists.

Categories

Resources