Using LBEvo information for iWidgets

Not only does LB implement iWidgets, it furthers what can be done with iWidgets.

iWidgets that use an Options.plist to set settings such as Location, Celcius, or 24 hr. Will not work in LBEvo all other iWidget will.

You can alter the ones with options.plist, and set manually by seeing what values are stored in the Option.plist. The Options.plist contains items such as.

<string>Enter Weather Code</string>
<string>locale</string> <-------contains your variable

If you look above you will see a key "name" this is what it tells the html/js to set this variable to.

Inside your .js file you can bypass this Options.plist just by adding var locale ="yoursettings"; instead of you typing this when you go set a iWidget on the springboard it will already have it set manually in the file.

Furthermore you can use LBEvo to set this value. Change to

var locale=localStorage.getItem('apiLocale');

This will get the location set from LBEvo wether it be GPS or Manually set.

Other values you can set are:

!! in version 1.1 Celsius is spelled Celcius this will be changed so be prepared to use
var celsius=localStorage.getItem('apiCelsius'); after 1.1

You will have to convert to true or false.
var celsius=localStorage.getItem('apiCelsius'); // m for celsius s for fareinheit can convert to true/false like this.


localStorage.getItem('api24hr'); returns true or false
localStorage.getItem('apiLocale'); returns zip or weather code
localStorage.getItem('apiBatterypercent'); returns battery percent without the % sign
localStorage.getItem('apiBatterycharging'); returns true or false
localStorage.getItem('apiPhone'); returns missed calls
localStorage.getItem('apiEmail'); returns emails
localStorage.getItem('apiSMS'); returns sms
localStorage.getItem('apiLat'); returns latitude

localStorage.getItem('apiLong'); returns longitude

How to create a music player iWidget

*New open urls from any iWidget inside LockBuilder.
You can make an iWidget with function window.parent.openurl(""); and it will open any url you have in between the "". This opens safari from the lockscreen.

Disk Space

var diskspace = formatSizeUnits(dsinbytes);
var diskfree = formatSizeUnits(dfinbytes);

function formatSizeUnits(bytes){
        if      (bytes>=1000000000) {bytes=(bytes/1000000000).toFixed(2)+' GB';}
        else if (bytes>=1000000)    {bytes=(bytes/1000000).toFixed(2)+' MB';}
        else if (bytes>=1000)       {bytes=(bytes/1000).toFixed(2)+' KB';}
        else if (bytes>1)           {bytes=bytes+' bytes';}
        else if (bytes==1)          {bytes=bytes+' byte';}
        else                        {bytes='0 byte';}
        return bytes;


DEMOS you can use the full code or use as reference.
Opening apps w/notifications
Full Weather
Music Player

If your widget is set for widgetweather it will be fine as its compatible with LBEvo

LBEvo iWidgets are beginning to be made. Free for you to use just as the themes. You can find them within LB or HERE If you need any help converting any just let us know @LockBuilder

Get LockBuilder Evo