Welcome to the CrackBerry Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 4 of 4
  1. edyb's Avatar
    CrackBerry Addict

    Posts
    766 Posts
    Global Posts
    794 Global Posts
    Thread AuthorThread Author   #1  

    Default Latest OS Webworks Backlight Hack

    Anyone notice that the backlight always-on hack with Webworks apps (using a looping video element) is working again? (this feature was broken on the previous OS update). Yay!

    Sent from my BlackBerry 9810 using Crackberry Tapatalk Forum app
  2. jeroen_13's Avatar
    CrackBerry Genius

    Posts
    1,757 Posts
    PIN
    Just PM
    #2  

    Default

    Could you please provide a sample code ? Thanks
    ❤ button

    ✪✪✪ Playbook + BB10 DEV , APPS ON REQUEST PLEASE PM ME. ✔✔✔[PB]Crackberry Forum App (NON-ANDROID) ✪✪✪
    ☢ bbUI.js ☢ expert -- Need HELP ? Just PM me ! ☣ Blackberry Playbook 64GB ☣
  3. edyb's Avatar
    CrackBerry Addict

    Posts
    766 Posts
    Global Posts
    794 Global Posts
    Thread AuthorThread Author   #3  

    Default Latest OS Webworks Backlight Hack

    I'm replying from my phone on the go so I don't have code to copy and paste, but basically the technique is to have Javascript create a loop using SetInterval or SetTimeout and call a function which plays a video element.

    The video element only has to be a second long. It is played using HTML5 video like this:

    <video width="320" height="240" controls>
    * <source src="movie.mp4" type="video/mp4">
    * <source src="movie.ogg" type="video/ogg">
    Your browser does not support the video tag.
    </video>

    You remove the controls and add autoplay="autoplay" tag, and put it all inside a HIDDEN DIV so it plays in background somewhere hidden. Also, make a video like 16x16 pixels only and maybe half a second long, so it is a tiny file, since all we need it for is the keep screen awake.

    Then using SetInterval or SetTimeout you repeatedly call your function that plays the video. Every time a video plays it seems to reset the backlight timer, or at least keep it on.

    Make just a simple app doing that and it should work. The code I based it on is found here:

    https://github.com/blackberry/WebWorks-Community-APIs

    In case the link above doesn't show up, Google "sleep tablet webworks community api".

    Turns out you actually don't seem to need the AIR extension and to install that other stuff in the ext folder. Just having a video playing will keep things awake even without the sleep extension above, but that is the code I base it on.

    Not the most efficient way, but for now webworks doesn't give us any other option and there is no options to put in the config.xml file at the moment either (except runwhenbackgrounded but that doesnt keep screen on either).


    Sent from my BlackBerry 9810 using Crackberry Tapatalk Forum app
  4. jeroen_13's Avatar
    CrackBerry Genius

    Posts
    1,757 Posts
    PIN
    Just PM
    #4  

    Default

    Thanks for the sample. I'll try it in my app.
    ❤ button

    ✪✪✪ Playbook + BB10 DEV , APPS ON REQUEST PLEASE PM ME. ✔✔✔[PB]Crackberry Forum App (NON-ANDROID) ✪✪✪
    ☢ bbUI.js ☢ expert -- Need HELP ? Just PM me ! ☣ Blackberry Playbook 64GB ☣

Similar Threads

  1. verizon 8130 and latest OS
    By gsdoc4kids in forum BlackBerry Pearl 81xx
    Replies: 34
    Last Post: 11-27-2009, 10:01 PM
  2. Latest OS Release: 8700g/c (GSM only) v4.2.1.96
    By kasperapd in forum BlackBerry 87xx Series
    Replies: 46
    Last Post: 02-19-2008, 07:54 AM
  3. Replies: 19
    Last Post: 12-26-2007, 08:13 PM
  4. Latest OS for 8300 Curve
    By reaper in forum General BlackBerry Discussion
    Replies: 1
    Last Post: 10-20-2007, 07:26 PM
  5. Latest OS
    By tmag2005 in forum General BlackBerry Discussion
    Replies: 6
    Last Post: 04-24-2007, 11:48 AM

Posting Permissions