[Q] Accelerometer sensor with screen off. - Galaxy S Advance I9070 Q&A, Help & Troubleshooting

Hello guys, first of all thanks to xda for making me redescover and love my phone! =)
My problem is that i'm using the sleep time app to wake up in the morning. This app uses the accelerometer of the phone to decide if u're in a deep rem phase or not and wakes you up when you're not. Until i was using the samsung 4.1.2 rom the app worked ok, but on other roms like all the cyanogenmod roms (tried all of them, 10.1, 10.2, 11), pacman, paranoid, carbon, ecc. the app stops receiving data from the accelerometer sensor when the screen goes off and it becomes a simple alarm clock. The only workaround that i found until now, is to enable the "keep the screen on while loading" in the developer settings. Is there any way to solve this problem, maybe to find out why in the samsung stock rom it's working and put that in the other roms.
Thanks in advance to everyone and sorry if i made any mistake in english, it's not my native language.
ps. A special thanks to all the developers here (i owe all of you a beer =)), love all the roms i found here, and keep up the awesome work:good:

Accelerometr works fine while screen is off. I am using sleep as android - similar sleep monitoring alarm as you, and it works fine while screen os off. I was using it on CM 10.1, 10.2 and now 11 by maclaw.
Check app settings. My app have sth like 'monitoring while screen is off' and when I run this option it checks if accelerometr works with screen off for like 2 minutes. Then it shows 'supported' or 'not supported' as test result. Mine said 'supported' and I can see nice graphs of how well I slept during that night when I wake up in the morning
Sent from my SGS Adv. using xda-developers app.

i guess the problem is the app then. thanks for the answer :good:, i'm gonna try your alarm clock

Were you able to keep getting the accelerometer values after the screen goes off? I have an app that loses the accelerometer values about 2 minutes after the screen goes off. Is there a way to keep getting the values after screen is off?
Thanks,
Norm

NormR1 said:
We're you able to keep getting the accelerometer values after the screen goes off? I have an app that loses the accelerometer values about 2 minutes after the screen goes off. Is there a way to keep getting the values after screen is off?
Thanks,
Norm
Click to expand...
Click to collapse
Maybe set deepsleep to 1. You need to be rooted with CoCore kernel or on some of CM based.
echo 1 > /d/cpuidle/deepest_state
But it will drain your battery faster. And I am not 100% sure if it will work. Reboot resets value to 3.
If it is working with 1, try 2 too.

shut_down said:
Maybe set deepsleep to 1. You need to be rooted with CoCore kernel or on some of CM based.
echo 1 > /d/cpuidle/deepest_state
But it will drain your battery faster. And I am not 100% sure if it will work. Reboot resets value to 3.
If it is working with 1, try 2 too.
Click to expand...
Click to collapse
Thanks for the response.
I don't want to "root" my system. There is another app: Shake that is able to do what I want on my system. I was hoping to be able to do what Shake does, but with less battery drain.
Norm

Related

[SOFTWARE] Notification LED FOUND!

Look what I just received on my RSS feed:
Translated from Italian
I'm studying it to see how it works, can someone help me?
Why don't you just link to the official thread? http://www.swedroid.se/forum/showthread.php?t=38703
I can tell you it's working!
/edit
Works like this:
When screen is off the app checks every 30 sec to see if there is any new incoming email, sms/mms, calls. If it's returned as true the lights of your touch buttons light up. It lights up every 10 sec for 3 hours. If the phone is not wakened withing that time, it stops.
The first time you have to press "start" to start the process. If you tick the "start service on boot", it's not necessarily to press start.
Test it with the "test" key.
You can also set the default value of the brightness of the buttons with this app
Think that's about what is important from that post.
Very nice, thanks for the hint.
I was watching the fact that is fulfilled by Log messages, is it normal?
Perfect Thnx a lot for the link.
Missed this feature since my change from Desire
Novek said:
Why don't you just link to the official thread? http://www.swedroid.se/forum/showthread.php?t=38703
I can tell you it's working!
/edit
Works like this:
When screen is off the app checks every 30 sec to see if there is any new incoming email, sms/mms, calls. If it's returned as true the lights of your touch buttons light up. It lights up every 10 sec for 3 hours. If the phone is not wakened withing that time, it stops.
The first time you have to press "start" to start the process. If you tick the "start service on boot", it's not necessarily to press start.
Test it with the "test" key.
You can also set the default value of the brightness of the buttons with this app
Think that's about what is important from that post.
Click to expand...
Click to collapse
checks every 30 sec? is it possible a battery drain issue or let the phone never sleep?
that was my thoughts too... Will check it out for a day and see.
Sent from my LG-P990 using XDA App
Wow, looks&works nice.. What about battery life impact?
I'm afraid it will drain terribly the battery... if someone can help me understand where is the code that controls the leds, I can try to set it up so that it's activated by notifications, instead of checking for them... we might need Paul's help here!!!
OK that's very nice and handy indeed, but i also wanna know about the battery drainage, on the otherhand using the app (or hidding menu) to reduce the output power of the leds you can conserve lot's of energy tho .
Yeah I'm not sure that's the way it's supposed to be done. While I am grateful for the dev of this app, I think the goal is to have these LEDS tied in to the Android Notification system itself, because any other way will be a drain on the battery.
Tegra2 is awesome because it takes up so little power in idle. If we have an app checking every 30s, the SoC is no longer idle, per say. If we increase the timer to let it idle, it's no longer a real notification system. Hence, this is probably not the way to go.
No I'm not sure where this is handled in Android though. If i'm not mistaken, a setting activated or not on the ROM, to tell the OS wether the phone has or not a LED for notifications. If so, we just need to rerout those acceses to the button LEDs. Then again, wtf do I know lol.
If anyone wants to point me in the right direction I'd love to look into that more closely (I dev C++, Java so should be able to work something out) Pm me.
There could be some push notification that goes to the notification bar, that may be used to also trig this software?
I guess it doesn‘t wake up the machine but runs as a background process.
Sent from my LG-P990 using XDA App
I've used it for a day now, fr6, 1200mhz overclock. After a lot of texting, and intense music playing I still have 30% battery. At the bottomline, I haven't noticed any impact on the battery life.
Sent from my LG-P990 using XDA App
I'm having a go at writing my own version that can do both brightness settings and notifications. So far I've caught up to Paul's app feature-wise, and will tackle notifications in a bit (hopefully in a more battery friendly way).
If I'm first done then I might put it on the market, but otherwise it's a great learning exercise for me!
Sent from my LG-P990
My fix is a 80$ liveview but I'm sure that's a little out of context.. still wish this phone came with an led notification. :/
Sent from my HTC Magic/Dream using XDA Premium App
thank you for the app,but there some problems with the app.the phone will reboot when you got some calls and messages.
Sent from my LG-P990 using XDA App
tiwiz said:
I'm afraid it will drain terribly the battery... if someone can help me understand where is the code that controls the leds, I can try to set it up so that it's activated by notifications, instead of checking for them... we might need Paul's help here!!!
Click to expand...
Click to collapse
Code:
echo 20 > /sys/devices/platform/star_touch_led/wled
20 is the brightness value i think.
I've used mine for 7 hours now, 50% left.
I've used wimp for music, wifi hotspot and xda/web. That's prof it's good enough for me...
Nice app! Just what I was looking for!

[APP] LG O2X Touch LED Notifications

I've been using Martin Börjesson's LED Notifications app for a while and you can now find it on the market!
"LG O2X Touch LED Notifications"
By Martin Börjesson
I found it's light on battery. And you can simply disable the notification part if you just want to recall the setting of touch LED brightness after reboot. It's free
I can't make it work with cyanogen nighlty :/
Pierrot94200 said:
I can't make it work with cyanogen nighlty :/
Click to expand...
Click to collapse
hmm..I can.
do i need to set any monitor app if i want it notice the miss call? if so, which?
Can't make it work with DocSlim
I tested all settings, i changed parameters in Accessibility, nothing happens...
Have you tried a reboot (though mine worked fine without on cm. Weird..)
Very nice, works on the G2x as well, with cm7
it works on su660 (korean version of o2X) too. thanks for good information.
Yep !
I've been using it since version 0.2 and it works really good. I just installed last version from market.
To emprize : no you don't need any app monitor for missed call. It's one of the 3 basics (Gmail, SMS/MMS, Missed call). Look into "notification" if "Missed call" is checked (should be by default).
lpn- said:
Yep !
I've been using it since version 0.2 and it works really good. I just installed last version from market.
To emprize : no you don't need any app monitor for missed call. It's one of the 3 basics (Gmail, SMS/MMS, Missed call). Look into "notification" if "Missed call" is checked (should be by default).
Click to expand...
Click to collapse
thx mate! how come i cant see the "missed call", lol
What about battery drain?
-=Beavis=- said:
What about battery drain?
Click to expand...
Click to collapse
I haven't noticed any as of yet but the way the program is set-up, it could be a battery guzzler. This app loops check for notifications as opposed to being built into the framework
jlevy73 said:
I haven't noticed any as of yet but the way the program is set-up, it could be a battery guzzler. This app loops check for notifications as opposed to being built into the framework
Click to expand...
Click to collapse
Thanks for the reply. I think I'll just try it myself!
If anyone of you notices a serious battery drain I'd appreciate a post
anybody know what's the accelerometer tolerance for? i don't quite get it.
Sent from my LG-P990 using XDA App
problems is that as soon as you have a notification, your phone will not go to sleep. And then will drain battery until you check your phone
Yea that's what I mean but you didn't notice a serious drain because of that?
Just to be sure, the screen remains off and the buttons glow it is simply that the phone doesn't go into "sleep" mode (what somehow makes sense)?!
Did some testing
And my sleeping phone (no notification) consume 2-3% an hour
With the notification glowing (meaning no sleep) for an hour, I loose 10%
The phone does sleep, the app has zero wakelock according to spare parts.
well, the leds are still blinking, from what I know (I still may be wrong there's no LG routine for the blinking. It does mean it's done by the "LG O2X Touch LED Notifications" so no sleep...
well this is what I'm guessing, since we do not have the source code
Just cos an app does something doesn't mean it has to keep the phone awake to do it

WIFI sleep policy on CM7

Hey guys,
ever since I used CM7 on my Galaxy it puts the WIFI in sleep mode as soon as i turn the screen off. I've set the sleep policy to never but yet it slows the datarate down first and then some seconds later it is stuck at 0 kb/s. That's very annoying especially if you download some bigger files. Is that a known bug on CM7 or is it just me?
Come on, i am the only one with that problem? :/
I don't have this problem, download continues even if the screen is locked...
Sent from my GT-I9000 using XDA Premium App
When I was using CM7 a while back I had this same issue. Had to make sure screen was on all the time. This and some other small issues made me switch back to Darky's ROM which lags like crazy, but at least has good battery life and is stable.
Are you sure? Even same speed as with screen turned on? How in the blue does it work for you? I've had this issue on every nightly so far
Ever tried another modem/kernel?
Sent from my GT-I9000 using XDA Premium App
Try this:
https://market.android.com/details?id=com.shantz.wifikeepalive&feature=search_result
I've tried several modems. Currently i'm on JVQ... As kernel I only tried Fugumod so far... but i seems like it works for others :/
@mobidzid
I've tried this and other apps who keep connection alive, but they have no effect at all for me :/
I have the opposite for MIUI rom.
The MIUI rom by default set the WIFI in sleep mode as soon as the screen is turned off. However, from the battery history, the WIFI never go to sleep. Is this a problem with MIUI rom or there are other setting required?
Nothing new on this? It really drives me crazy here
Please delete, I wrote into the wrong thread... :O
worly said:
Hey guys,
ever since I used CM7 on my Galaxy it puts the WIFI in sleep mode as soon as i turn the screen off. I've set the sleep policy to never but yet it slows the datarate down first and then some seconds later it is stuck at 0 kb/s. That's very annoying especially if you download some bigger files. Is that a known bug on CM7 or is it just me?
Click to expand...
Click to collapse
I have same problem?! If anyone solved problem?

NC, CM7, Dalingrin OC kernel.. Sleep of Death

CWM 3.2.0.1
CM7 Nightly 131
update-CM7-dalingrin-OC-emmc-063011
Sleep of Death-
Sometimes the screen will remain black when trying to wake the device. I haven't been able to find a pattern to the problem, though I think it has something to do with the kernel. It seems completely random.
This has happened on every nightly I've used, which is why I think it's related to the kernel.
Has anyone found a fix?
omnibyte said:
CWM 3.2.0.1
CM7 Nightly 131
update-CM7-dalingrin-OC-emmc-063011
Sleep of Death-
Sometimes the screen will remain black when trying to wake the device. I haven't been able to find a pattern to the problem, though I think it has something to do with the kernel. It seems completely random.
This has happened on every nightly I've used, which is why I think it's related to the kernel.
Has anyone found a fix?
Click to expand...
Click to collapse
Not sure to what the cause is. However, for me I noticed that every time I left wifi on and put my nook to sleep I would get sod anytime after an hr. So now I manually disconnect wifi every time I put my nook to sleep, and I have not once experienced another sod. There are some people that say the latest nightlies have fixed sod but other report there still there so I guess it varies.
I'm currently on n125 with dal's 6/30 oc kernel.
The problem still occurs with the recent nightlies.
It's weird, last night I left it in sleep mode with wifi turned on, and it powered up fine this morning.
A few hours later, I put it in sleep mode, set it down for a minute, then tried to use it again. It wouldn't wake up. From what I can tell, it doesn't matter what amount of time passes.
I'll keep trying the wifi trick you mentioned. If disabling wifi does the trick, then that will narrow down the problem quite a bit.
Thanks for the tip!
dabiddabird said:
Not sure to what the cause is. However, for me I noticed that every time I left wifi on and put my nook to sleep I would get sod anytime after an hr. So now I manually disconnect wifi every time I put my nook to sleep, and I have not once experienced another sod. There are some people that say the latest nightlies have fixed sod but other report there still there so I guess it varies.
I'm currently on n125 with dal's 6/30 oc kernel.
Click to expand...
Click to collapse
I am on n120 with dals 6/30...I always got SOD when I left wifi set to always on...when I switched wifi to shut off with the screen, the problem has not returned!
Yup, it looks like turning wifi off before it sleeps does the trick. 48 hours later and no SOD.
Thanks for the tip!
cmdauria said:
I am on n120 with dals 6/30...I always got SOD when I left wifi set to always on...when I switched wifi to shut off with the screen, the problem has not returned!
Click to expand...
Click to collapse
How do you set wifi to shut off with the screen? I can't find a setting for it.
omnibyte said:
How do you set wifi to shut off with the screen? I can't find a setting for it.
Click to expand...
Click to collapse
Try an app like juice defender.
Sent from my phone using Tapatalk
omnibyte said:
Yup, it looks like turning wifi off before it sleeps does the trick. 48 hours later and no SOD.
Thanks for the tip!
Click to expand...
Click to collapse
No problem glad it worked for you.
koopakid08 said:
Try an app like juice defender.
Sent from my phone using Tapatalk
Click to expand...
Click to collapse
Great, thanks for the recommendation.
If you are looking for a free solution to do this, the application Setting Profiles Lite allows you to set exactly one rule.
Create a profile with wifi off. Create a rule to set the wifi off profile when the screen is off.
Frank
frankusb said:
If you are looking for a free solution to do this, the application Setting Profiles Lite allows you to set exactly one rule.
Create a profile with wifi off. Create a rule to set the wifi off profile when the screen is off.
Frank
Click to expand...
Click to collapse
http://nookdevs.com/NookColor_Issues#Workaround_One
Details there if anyone wants to try it, works great. I used it on stock ROM, now that I have Tasker on my tablet I use it instead, but all the same.
I'm experiencing the SOD on CM 7.1 RC1... so it's not limited to the nightly's.
Has anyone escalated to the CM devs yet?
I think I have found a temp fix for the SOD, doubled my battery life, and increased my bandwidth when tethered. I am no expert at any of this, but after I installed DroidWall from the market and used the "white list" mode enabling only the apps I wanted to use the network I no longer get SOD. For example I am using wifi tether on my galaxy s in infrastructure mode with droidwall on my NC only allowing XDA app access to the internet.
I also have it installed on my galaxy and only have Linux kernel and applications with root accessesing data. I have gotten more than 8 hours on the galaxy without having to charge. Now I am able to have it tethered to my NC all day and neither device needs charging.
Heck maybe its a placibo effect maybe not.
Running CM7.1 RC1
Now if I can figure out why I lost the ability to mount my NC mass storage on the PC after using the new USB host mode and playing with the wiimote. Go figure
Sent from my NookColor using XDA Premium App
skylar.sutton said:
I'm experiencing the SOD on CM 7.1 RC1... so it's not limited to the nightly's.
Has anyone escalated to the CM devs yet?
Click to expand...
Click to collapse
I've also been seeing SOD almost every time I put the NC to sleep for an extended period of time (longer than an hour). Also running 7.1 RC1. Weird thing is that it's been within the last 2 weeks that it's been happening. I've tried the Setting Profiles workaround listed above but I'm not sure if I set up the rules correctly so we'll see what happens
The setting profiles workaround didn't seem to work. I tried switching out my almost full 8gb sd card for a 16 gb sd card and after putting it to sleep overnight, it came back on immediately. Would sd card memory have anything to do with it?
I have also found AutomateIt (free market app) to work well for setting triggers and actions... i.e.
Power Plugged In -> Set Screen Off Timeout 30 min
Power UnPlugged ->Set Screen Off Timeout 2 min
Screen Off -> Set WiFi State Off (delay 5 min)
Screen On -> Set WiFi State On (no delay)
Just my $0.02... but a profile/setting switcher is not a "fix" for the SOD... it's a work around (and an ineffective one at that). The underlying problem still exists, so nothing has been fixed, we're just maneuvering around it.
I'm going to work on something that logs to a remote file and let it run for a few days. I'm hoping I can catch some data around what is going on immediately prior to the lock up.
Also, sorry for the bump.

[Q] Wake up on charging

I like to keep the battery in my Note as charged up possible which means I plug it into the charger most times I come home and so I have to unplug it whenever I leave ... and so both coming and going the phone display turns on when I plug/unplug it and 99.9% of the time I don't want this. If the display is off it should just stay that way! For some reason I find this unwanted behavior so obnoxious I was going to get rid of the phone ... until I realized that getting a new phone might likely have the same problem since it seems to be quite common. I'm not so sensitive to other things not quite working the way I would like, but that one is so obviously crazy and happens so many times per day that it bugs me more and more each day. I've never seen this discussed, so my main confusion on this issue is why this doesn't seem to bother anybody else.
Anyway I noticed in the Revolt Rom there is a feature in the list called "Wake up on charging".
Does having this feature imply that one can disable it ... i.e. not have it wake up when the charger is plugged in?
Also does this mean that you can also disable Wake up when charging is terminated by unplugging the charger?
Please say yes and I will just die now and go to heaven.
If my interpretation of this feature is correct ... can most modern roms do this or is this unique to the Revolt rom?
Thanks
~Paul
~Paul
wrong section to post q
I have found option in developer menu but that states to keep device awake.
Usually screen dims and sleeps after a while.
I press powerbutton to put screen into sleep.
Another workaround could be to use tasker and program it to set screen off upon adding charger.
Sent from my GT-N7000 using Tapatalk 2
baz77 said:
Usually screen dims and sleeps after a while.
I press powerbutton to put screen into sleep.
Click to expand...
Click to collapse
Yes it dims after 10 minutes (in my case since that is my sleep delay setting), but why should I waste 10 minutes of power or why should I have to press the power button to avoid this? My point is that this makes no sense. It would make way more sense for the screen to turn off when I tell it to and not otherwise.
> Another workaround could be to use tasker and program it to set screen off upon adding charger.
Now you're talking. A suggestion that actually worked. I had never heard of tasker. I paid the 3 bucks, then spent an hour learning how it works and figuring out the right combination of profile contexts and tasks ... and then it didn't work. I was using button number 26 which was supposed to be the power button but I never figured out why this didn't turn off the screen on the N7000. (Surprisingly tasker does not have a task identified as turning off the display!). Eventually however I stumbled across the fact that the task item called "system lock" turned off the display, and that did the trick for me. It was a minor expense and a lot of work to get my phone to behave the way I believe it should have to begin with ... but I'm happy that I prevailed in the end. Thanks very much for your suggestion.
~Paul
Haven't seen that option in stock-based ROMs but CM ROMs can do this.
I'm currently using CM10.2 and the screen stays off while connecting/disconnecting the charger
good one
jakuburban said:
Haven't seen that option in stock-based ROMs but CM ROMs can do this.
I'm currently using CM10.2 and the screen stays off while connecting/disconnecting the charger
Click to expand...
Click to collapse
Do you know if that is true with CM10.1 based roms as well?
I don't flash often, and I don't want to flash a CM10.2 based rom since it looked to me that this was still too much of a work in progress.
~Paul
pmennen said:
Do you know if that is true with CM10.1 based roms as well?
I don't flash often, and I don't want to flash a CM10.2 based rom since it looked to me that this was still too much of a work in progress.
~Paul
Click to expand...
Click to collapse
I think jellybam had this option and surely some other ROMs have it too, but I can't help You with 10.1 ROMs as I don't use them myself.
However You might wanna give a chance to 10.2. I think it's pretty good for daily usage as I'm using it like 3 weeks now. All the major bugs have been fixed. The only unsupported apps are the navigation ones like tom tom and automapa. However forevermaps still works.
That's what worked for me in Tasker
Profile: State/Power/Power any
Entry --> Power - On
Exit <-- Power - Off
Task: Power - On
Variable/Variable set/%PWR =1
Task: Power - Off
Variable/Variable set/%PWR =0
Profile: State/Display/Display State Off
Entry --> Power - Old
Exit <-- Screen - Off
Task: Power - Old
Variable/Variable set/%PWR_OLD = %PWR
Task: Screen - Off
Display/System Lock
If %PWR_OLD =/= (not =) %PWR
Variable/Variable set/%PWR_OLD = %PWR

Categories

Resources