| | |  | |
05-13-2008, 02:49 PM
|
#1 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Dec 2004 Location: Alexandria, VA Model: 9700 Carrier: T-Mobile
Posts: 231
Post Thanks: 0 Thanked 0 Times in 0 Posts
| BBLight - Anyone Care to Make Some Updates? Please Login to Remove! Unfortunately I'm not a Java programmer and I don't have a BB certificate to sign code so working with BBLight is beyond me. I have taken a look at the code as well as the API reference in the BB JDE and understand that to access the backlight you have to have signed code.
What I'm interested in is a "fix" to the program. On my first BB (a 7230) if BBLight was set to keep the backlight on with external power it would also keep my device from locking (security profile pushed to my device locks it in 10 minutes). I would guess that the code was resetting the idle timeout and the bb believed that there was user input so it didn't lock.
Unfortunately, on my 8700 as well as my new 8820 BBLight does not keep the device from locking and as soon as it locks the backlight cycles on - off - on - off.....making BBLight unusable for me.
The code looks fairly compact and I would believe that someone could add a check that if the device is on external power to reset the idle time and keep the device from locking and hence the backlight working instead of cycling.
Thanks,
SMF
Last edited by SMF : 05-15-2008 at 01:59 PM.
| | Offline
| |
05-13-2008, 07:18 PM
|
#2 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Mar 2008 Location: Tacoma, WA USA Model: STORM PIN: N/A Carrier: AT&T
Posts: 269
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Yeah... especially to have the backlight come on when you get a text mail like you do when you get a phone call. That status light simply isn't big enough to see when laying down on the computer desk and on vibrate. | | Offline
| |
05-15-2008, 10:46 PM
|
#3 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Apr 2005 Location: Los Angeles, CA USA Model: 9000 OS: 4.6.0.247 Carrier: AT&T
Posts: 209
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Quote:
Originally Posted by SMF Unfortunately your modification doesn't fix my issue. | Looking at the simulator/debugger for a 7230, when BBlight turns on the backlight, the idle time is automatically reset. This is why it worked on your old device. On an 8800 in the simulator/debugger, the idle time is not reset. My guess is that RIM changed something in the newer OS's. I don't know of any other way to reset the idle time, so you're out of luck unless you can figure something out. | | Offline
| |
05-16-2008, 05:36 AM
|
#4 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Dec 2004 Location: Alexandria, VA Model: 9700 Carrier: T-Mobile
Posts: 231
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Tateu,
Thanks for looking it over. I'll poke at the API to see if any ideas appear to me. I assume there is no explicit function in the API to reset the device timer. Can you determine why the backlight cycles on and off when my phone is locked?
Thanks,
SMF | | Offline
| |
05-16-2008, 06:01 AM
|
#5 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Apr 2005 Location: Los Angeles, CA USA Model: 9000 OS: 4.6.0.247 Carrier: AT&T
Posts: 209
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Wirelessly posted
There is Deviceinfo.getIdleTime() but I haven't found anything to reset idle time. I did try injecting a key press, which does reset idle time, but no one would want a random character typed in every 10 seconds.
It looks like maybe locking the device automatically turns off the backlight, so BBLight runs every polling interval and turns it on and then screenlock instantly turns it off. | | Offline
| |
05-16-2008, 09:47 AM
|
#6 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Dec 2004 Location: Alexandria, VA Model: 9700 Carrier: T-Mobile
Posts: 231
Post Thanks: 0 Thanked 0 Times in 0 Posts
| tateu,
Thanks. I haven't had a chance to look at the API yet. In the interim could you ad a switch to the code to check whether the device is locked and if so not force the backlight on?
Also - did you post the code mods to the CVS? While I'm not up on java programming I can roughly follow the logic flow.
Thanks,
SMF | | Offline
| |
05-16-2008, 11:54 AM
|
#7 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Apr 2005 Location: Los Angeles, CA USA Model: 9000 OS: 4.6.0.247 Carrier: AT&T
Posts: 209
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Try v1.84:
OTA - http://www.tateu.net/software/bb.php?f=bblight
Desktop - http://www.tateu.net/software/bb.php?f=bblightdt
I added a check for isSystemLocked() which keeps the backlight from turning on at every polling interval when locked. I decided to still let SMS and email turn it on when it is locked, though.
I don't have access to the BBTools sourceforge CVS. I just put the modded code in a zip file on my site. I will put v1.84 code up in a few hours and post a link here. | | Offline
| |
05-16-2008, 12:18 PM
|
#8 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Dec 2004 Location: Alexandria, VA Model: 9700 Carrier: T-Mobile
Posts: 231
Post Thanks: 0 Thanked 0 Times in 0 Posts
| tateu,
It works - when the device locks the backlight goes out and stays out. If an email is received (and the option is set) the backlight comes on for a short period (1-2 seconds - corresponding to when my bb is vibrating) and then goes out.
I'm still looking over the API to see if anything pops out as a way to keep the bb from locking. Perhaps using what I'll call an escape keystroke? On my 8820 that would be the key to the right of the trackball. At the home screen it does nothing. Another potential would be to use the setTimeout to "reset" the backlight timeout to the default value - would that reset the idle timeout?
Thanks,
SMF
Last edited by SMF : 05-16-2008 at 01:48 PM.
| | Offline
| |
05-16-2008, 02:11 PM
|
#9 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Apr 2005 Location: Los Angeles, CA USA Model: 9000 OS: 4.6.0.247 Carrier: AT&T
Posts: 209
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Quote:
Originally Posted by SMF I'm still looking over the API to see if anything pops out as a way to keep the bb from locking. Perhaps using what I'll call an escape keystroke? On my 8820 that would be the key to the right of the trackball. At the home screen it does nothing. | I don't think inserting a key press event is a good idea. Let's say BBLight is running in the background, you're browsing a web page and have filled in a bunch of form data and then you put your BB down for a few minutes to do something else but you haven't submitted the form. At the poll interval, BBlight will send an Escape key press which will back you out of the web page. | | Offline
| |
05-16-2008, 02:13 PM
|
#10 (permalink)
| | Flying Moderator
Join Date: Jun 2005 Model: Z10 OS: 10.0.10.x PIN: s & needles Carrier: T-Mobile US
Posts: 34,607
Post Thanks: 1 Thanked 65 Times in 55 Posts
| I'm guessing that a key press event would require "keystroke injection." That's most likely restricted by your IT policy, as well. | | Offline
| |
05-16-2008, 03:29 PM
|
#11 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Apr 2005 Location: Los Angeles, CA USA Model: 9000 OS: 4.6.0.247 Carrier: AT&T
Posts: 209
Post Thanks: 0 Thanked 0 Times in 0 Posts
| | | Offline
| |
05-17-2008, 01:14 PM
|
#12 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Dec 2004 Location: Alexandria, VA Model: 9700 Carrier: T-Mobile
Posts: 231
Post Thanks: 0 Thanked 0 Times in 0 Posts
| tateu,
Well I'm still looking to see if I can find any ideas about keeping the device from locking but I see in the JDE for 4.3 that changing the idle time is by default not allowed when using BES. Do you think it would be possible to keep the backlight on while the device is locked? I don't see any obvious way to override the device turning the backlight off when locked.
Thanks so much for working on this.
SMF | | Offline
| |
05-17-2008, 02:18 PM
|
#13 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Apr 2005 Location: Los Angeles, CA USA Model: 9000 OS: 4.6.0.247 Carrier: AT&T
Posts: 209
Post Thanks: 0 Thanked 0 Times in 0 Posts
| The only reason I can imagine that anyone would want the backlight to remain on is if they were watching video. When the device is locked, doesn't it clear the screen and display owner information? So then, why would you want the light on when the device is locked?
For things such as web browsing, you can set the backlight timeout to as high as 2 minutes. That should be enough time to read one screen of text before you scroll to another page, which resets the idle timeout giving you another 2 minutes.
Having said that, I know how to keep the backlight on when locked (tested it and it works)...In BacklightController.java, set "private static int TOLERANCE" to something less than 4000 (4 seconds). Also set the poll interval in BBLight options to less than 4000. And now, with the isSystemLocked check that I recently added turned off, the backlight will be turned on, over and over again before the SystemLock function can turn it off.
At the moment, I am leaning heavily against adding this feature unless I hear a good reason for it. But even if I don't hear a good reason for it, I can compile a custom build for you. Or I guess I could just add an option for "Keep on when System is Locked" to the options screen, then I wouldn't mind as much adding it to the official build. | | Offline
| |
05-17-2008, 08:55 PM
|
#14 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Dec 2004 Location: Alexandria, VA Model: 9700 Carrier: T-Mobile
Posts: 231
Post Thanks: 0 Thanked 0 Times in 0 Posts
| tateu,
My first wish would be to keep the device unlocked with backlight on when connected to external power. Then when I'm in the car I can easily see if a new email has arrived (see the new message indicator and when traffic/driving allows quickly scan the title/email without having to try and type in a password to unlock the device. The way the bb can shift around I can't always see the red led and I don't find that as reliable a way to see if new emails have arrived as looking at the email indicator on the screen.
If it's not possible to keep the device unlocked then keeping the backlight on when on external power would at least let me quickly look at the screen and see if a new email had been received. I generally keep my device on vibrate and in the car it's not too hard to miss an email coming in.
Any, as I have previously said, I really appreciate you taking time to work on bblight as well as bbweather.
SMF | | Offline
| |
05-17-2008, 09:06 PM
|
#15 (permalink)
| | BlackBerry Extraordinaire
Join Date: Aug 2005 Location: PA Model: STORM OS: 4.7.0.151 PIN: MOBILE Carrier: VERIZON
Posts: 2,089
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Quote:
Originally Posted by tateu The only reason I can imagine that anyone would want the backlight to remain on is if they were watching video. When the device is locked, doesn't it clear the screen and display owner information? So then, why would you want the light on when the device is locked?
For things such as web browsing, you can set the backlight timeout to as high as 2 minutes. That should be enough time to read one screen of text before you scroll to another page, which resets the idle timeout giving you another 2 minutes.
Having said that, I know how to keep the backlight on when locked (tested it and it works)...In BacklightController.java, set "private static int TOLERANCE" to something less than 4000 (4 seconds). Also set the poll interval in BBLight options to less than 4000. And now, with the isSystemLocked check that I recently added turned off, the backlight will be turned on, over and over again before the SystemLock function can turn it off.
At the moment, I am leaning heavily against adding this feature unless I hear a good reason for it. But even if I don't hear a good reason for it, I can compile a custom build for you. Or I guess I could just add an option for "Keep on when System is Locked" to the options screen, then I wouldn't mind as much adding it to the official build. | I think adding an option is the way to go.
__________________
STORM (9530)
| | Offline
| |
05-17-2008, 10:04 PM
|
#16 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Apr 2005 Location: Los Angeles, CA USA Model: 9000 OS: 4.6.0.247 Carrier: AT&T
Posts: 209
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Test v1.86,
OTA only http://www.tateu.net/software/bb.php?f=bbtest
There is a new checkbox near the top, "Active When Device is Locked." Check this and set the poll interval to 2000 (2 seconds). With this checked, BBlight will force the backlight on every two seconds. On my Verizon 8703e BIS, that is enough to always keep it on. It looks like 4000 works also, but anything higher and the light will flash on and off.
For some reason, in addition to the user adjustable poll interval, there was a hard coded poll interval of 8 seconds. Even if the user chose a poll interval of 2000, BBlight would only send the backlight.enable(true) command every 8 seconds. Now, with the new option, the hard coded poll interval changes to 2 seconds.
Oh, and the "Device Locked" option doesn't affect the SMS and Email options. In this version, they are always active when the device is locked, even with this new option unchecked. Should I have them affected by the "Device Locked" option?
Last edited by tateu : 05-17-2008 at 10:07 PM.
| | Offline
| |
05-18-2008, 03:08 AM
|
#17 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Nov 2007 Location: Canada Model: 9000 OS: 5.0.0.509 PIN: N/A Carrier: Rogers
Posts: 413
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Tateu.. thx so much for making bblight work properly! I'm trying to figure out the "unholster" change. With the new setting, I believe the bblight is always on unless holstered. I'm all for that if the battery drain is acceptable. (I find that the battery lasts ages anyway and I charge it daily so as long as it lasts a day, I'm good.)
What I was originally hoping for was for the light to stay on when plugged in, removing from holster (which I think worked the old way for me) but then if I was using the BB, the light went out. So, as long as it worked while being used, I was good. I'm just rambling. My key point is that I really appreciate what you've done and all the options you've added.
Last edited by sheldonbk : 05-18-2008 at 03:11 AM.
| | Offline
| |
05-18-2008, 03:27 AM
|
#18 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Apr 2005 Location: Los Angeles, CA USA Model: 9000 OS: 4.6.0.247 Carrier: AT&T
Posts: 209
Post Thanks: 0 Thanked 0 Times in 0 Posts
| Quote:
Originally Posted by sheldonbk What I was originally hoping for was for the light to stay on when plugged in ... | Are you saying that the "External Power/Charging" option does not keep your backlight on when power is plugged in? Quote:
Originally Posted by sheldonbk What I was originally hoping for was for the light to stay on when ... removing from holster (which I think worked the old way for me) | The backlight should turn on when removing the BB from the holster without BBlight. Atleast, mine does (8703e). And then it will turn off if you are idle for xx seconds. With my mods to BBlight, you can keep the backlight always on when the device is out of the holster. The original version only sent the backlight on command when the device was fist removed, which seems redundant to me, since the BB does that on it's own. Quote:
Originally Posted by sheldonbk ... but then if I was using the BB, the light went out. So, as long as it worked while being used, I was good. | Again...The backlight should stay on forever when you are using the BB without BBlight. Everytime you press a key, trackball, scrollwheel, etc. the Blackberry OS resets the idle timer to keep the backlight from going out. I don't understand why the "User is Active" option is even in BBlight. I left it in, though, in case I am missing something in my understanding of how the BB works. | | Offline
| |
05-18-2008, 03:51 AM
|
#19 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Nov 2007 Location: Canada Model: 9000 OS: 5.0.0.509 PIN: N/A Carrier: Rogers
Posts: 413
Post Thanks: 0 Thanked 0 Times in 0 Posts
| No problem at all Tateu - works great. I don't 100% understand how it works, etc. But, it definitely does the job now that you've enhanced it. It didn't work great before - which was the time I was referring to as "originally". ie before you dealt with it. | | Offline
| |
05-18-2008, 07:20 AM
|
#20 (permalink)
| | Talking BlackBerry Encyclopedia
Join Date: Dec 2004 Location: Alexandria, VA Model: 9700 Carrier: T-Mobile
Posts: 231
Post Thanks: 0 Thanked 0 Times in 0 Posts
| tateu,
Works great - keeps the backlight on fine when locked. I agree with your choice of not having the "Device Locked" option affect the SMS and Email options. I would not have them affected by the "Device Locked" option.
I would appreciate if you can still keep your thinking cap on regarding keeping the device from locking while on external power. In the meantime you've made bblight immensely useful again.
Thanks,
SMF | | Offline
| |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | |