User Tag List

  1. bokou's Avatar
    Having some issues with a lockscreen I just made. I am probably going to dig through a few I've got to see if they're including something I haven't thought of but I've got one problem and a few questions...

    Here's a screenshot:

    My problem:
    It's an HTML lockscreen and uses a few CSS features that I was surprised it supported - things like webkit's transforms (didn't seem to work with translate3d, but I may have been doing it wrong) and gradients. The lockscreen isn't "updating" or "refreshing" though when I hit the sleep/wake button to check it. It will update if I unlock the screen and re-lock it. Is there anything I need to be including to keep it updating in the background?

    My questions:
    Does iOS's mobile safari (which is what I assume is the engine running the HTML lockscreen?) support the new Battery Status API? ( Battery Status API ) It'd be really cool to come up with a way to retrieve the battery level from the device using javascript and use CSS to style say a fuel gauge needle to show empty or full or somewhere in between based on the value.

    Is there anything else useful I can retrieve from the device through javascript to include on a lockscreen? I've seen people pull weather based on a zip code or something in the lockscreen's HTML, but I haven't planned on including weather on my lockscreens (although I may at some point).
    2013-06-06 03:04 PM
  2. DC_Dave's Avatar
    Hi, you might like to take a look at Cydget in Cydia. This enables you to have your own HTML / JavaScript code with access to Objective C libraries from your Lockscreen. A good example of how this is implemented is if you install Places Cydget which uses touch screen buttons, system clock and website images. For websites on your lockscreen, have a look at the easily alterable FaceBook Mobile Cydget. These Cydgets are stored at /System/Library/LockCydgets. You can alter the Cydget's index.html file to incorporate web cameras, weather radars and websites. The PerPageHtml Lockscreen weather themes like UniAW6.3_LS_(Accuweather).zip and HTC_UniAW6_with_forecast.rar also work, but as they are some 30MB in size, don't put them in
    /System/Library/LockCydgets as this is system memory, instead create a .cydget link to them.
    2013-06-07 01:50 PM
  3. bokou's Avatar
    Any ideas on why my lockscreen isn't updating the time while its "asleep?" I have to unlock and relock it for it to display the current time.
    2013-06-08 03:23 AM
  4. DC_Dave's Avatar
    Hi, your car theme would be good when driving, also would be clever to use GPS to match the car speed. If you post your code, maybe someone might be able to figure out your update issue for you.
    2013-06-08 10:01 AM
  5. bokou's Avatar
    Yeah I was going to but it got late last night. Here's the LockBackground.html

    Auto lockscreen -
    2013-06-08 12:27 PM
  6. DC_Dave's Avatar
    Hi, looking at other themes, some use the setInterval command to refresh the time. (1000 = 1second)
    In your code, you could add

    setInterval(myTime, 1000);

    where myTime is the name of your function to fetch the current time.
    So from your Pastebin

    <script type="text/javascript">


    setInterval(myTime, 1000);

    function myTime() {

    var currentTime = new Date();
    var hours = currentTime.getHours();
    var minutes = currentTime.getMinutes();

    if (minutes < 10)
    minutes = "0" + minutes;

    var suffix = "AM";

    if (hours >= 12) {
    suffix = "PM";
    hours = hours - 12;

    if (hours == 0) {
    hours = 12;

    document.write("<h1 class=time>" + hours + "." + minutes + " " , "</h1>");

    If use iFile web viewer, the above patch writes the time every second, not too sure how you get it to work on the lockscreen correctly though.
    2013-06-08 06:50 PM
  7. bokou's Avatar
    thanks for your suggestions so far - I'll be giving that a shot and posting an edit/update on whether or not it worked. I tried using a meta tag refresh interval but that didn't work.

    update: the screen just blacks out after 1 second now... still hunting
    Last edited by bokou; 2013-06-09 at 01:53 AM.
    2013-06-09 12:51 AM
  8. King_O_Hill's Avatar
    You are building this like it is for a computer browser instead of for an iPhone. Just post the entire widget here and maybe we can help you.

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0
    2013-06-09 04:36 AM
  9. DC_Dave's Avatar
    update: the screen just blacks out after 1 second now... still hunting
    Hi, yes i got stuck on that too, if you open your LockBackground.html with iFiles web viewer, you can see the time increase every second though. Im sure these experienced guys here can help more than me.
    2013-06-09 09:23 AM
  10. bokou's Avatar
    King o hill, it's an HTML lockscreen - it doesn't use widgets or anything like that. It's structured with HTML, styled with CSS and uses Javascript for functions like pulling and displaying time, etc.
    2013-06-09 06:40 PM