Page 29 of 68 FirstFirst ... 19272829303139 ... LastLast
Results 561 to 580 of 1354

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: LockBuilder Evo "The Evolution has begun"

  1. #561
    apiLocale is keeping a weather code. If the widget doesn't take a weather code the widget will not work. Just FYI

  2. #562
    That's why I thought that second one would work. It's so basic and just needs a weather code, hence me replacing it with your code.
    With regards to the other; it seems the majority of iWidgets use the Weather Widget for location. All I was suggesting was modifying the location.js file to send the location info from your app. That would resolve about 90% of the iWidgets I've seen over the past few months.
    I was just coming up with suggestions dude, which I hope are gonna be useful. Especially if people could just change one script file for another and 'bosh' it's sorted.
    Anyway, I await your thoughts.
    Thanks again mate


    Sent from my iPhone using ModMyi

  3. #563
    iPhone? More like MyPhone DutchMaster22's Avatar
    Join Date
    Mar 2009
    Location
    CT
    Posts
    250
    Thanks
    69
    Thanked 46 Times in 44 Posts

    Default LockBuilder Evo "The Evolution has begun"
    Ok June, so I removed custom ls and installed lock screen tool. Still having the same issue with not seeing any elements. I'm getting a black screen now. It seems like there is an extra layer on the lock screen blocking lbevo. I attached some pics of my installed tweaks. I've been using NextGenUI and groovy lock. Disabled groovylock before activating lbevo. ImageUploadedByModMyi1402153355.544017.jpgImageUploadedByModMyi1402153366.305963.jpgCould it be aura? I don't have it active in cydgets and I tried to uninstall it but it's not showing up in my cydia packages, because it was a manual install I'm guessing.
    Last edited by DutchMaster22; 2014-06-07 at 05:06 PM.

  4. #564
    Quote Originally Posted by DutchMaster22 View Post
    Ok June, so I removed custom ls and installed lock screen tool. Still having the same issue with not seeing any elements. I'm getting a black screen now. It seems like there is an extra layer on the lock screen blocking lbevo. I attached some pics of my installed tweaks. I've been using NextGenUI and groovy lock. Disabled groovylock before activating lbevo. ImageUploadedByModMyi1402153355.544017.jpgImageUploadedByModMyi1402153366.305963.jpgCould it be aura? I don't have it active in cydgets and I tried to uninstall it but it's not showing up in my cydia packages, because it was a manual install I'm guessing.
    No clue. It's as simple as installing iCleaner and turning off everything until you find it.

  5. #565
    I wish there was a crash reporting tool for JB'd devices. Would be so useful. I've used Semi Restore in the past and it was excellent. It's a laborious process of elimination unfortunately


    Sent from my iPhone using ModMyi

  6. #566
    Quote Originally Posted by NeilJClements View Post
    I wish there was a crash reporting tool for JB'd devices. Would be so useful. I've used Semi Restore in the past and it was excellent. It's a laborious process of elimination unfortunately


    Sent from my iPhone using ModMyi
    Crash reporter is in cydia.

    First widget works fine. Just un-comment what is commented out. Specially

    Code:
    var locale = localStorage.getItem('apiLocale')
    var isCelsius = true //true|false// 
    var useRealFeel = false //true|false//
    Last edited by June'sIphone; 2014-06-07 at 06:11 PM.

  7. #567
    I tried that and it didn't work for me, however I'm having some issues with my widgets at the moment, so that's definitely my problem.
    Thank you for that. I can build the iWidget I had in mind for my new LBEvo theme! :-)
    Look forward to your response on the other one. That's gonna release 100's of iWidgets to the themer'


    Sent from my iPhone using ModMyi

  8. #568
    Second one uses widget weather which just pulls Longitude and Latitude. You can get to LockBuilders Lat/Long by

    Code:
    localStorage.getItem('apiLat');
    localStorage.getItem('apiLong');
    Simply replace the variable that wants the lat/long.

    Example.

    Code:
    var latitude = $.trim(templatitude[1]);
    var longitude = $.trim(templongitude[1]);
    Code:
    var latitude =localStorage.getItem('apiLat');
    var longitude = localStorage.getItem('apiLong');
    Also a lot of code needs to be changed. Specially

    Code:
    jQuery.get('file:///private/var/mobile/Documents/myLocation.txt'

    Which is tied to a function. so if it doesn't read (because deleted) that file it won't load this function. Therefore I would remove it entirely, create a function specifically for it. Trigger the function then setInterval to refresh.
    Code:
    function UpdateLocation() {
    refreshLocationTimer = setTimeout(UpdateLocation, 20*1000);
    jQuery.get('file:///private/var/mobile/Documents/myLocation.txt', function(appdata) {
    //jQuery.get('myLocation.txt', function(appdata) {
    var myvar = appdata;
    var substr = appdata.split('\n');
    var templatitude=(substr[0]).split('=');
    var templongitude=(substr[1]).split('=');
    var latitude = $.trim(templatitude[1]);
    var longitude = $.trim(templongitude[1]);
    
    if ((prevlatitude != latitude) || (prevlongitude != longitude)) {
    	if (latitude < 0) { textLat = Math.round(latitude*100)/100 + "\u00B0" + "S"; }
    	else if (latitude > 0){ textLat = Math.round(latitude*100)/100 + "\u00B0" + "N"; }
    	else { textLat = Math.round(latitude*100)/100 + "\u00B0"; }
    	if (longitude < 0) { textLong = Math.round(longitude*100)/100 + "\u00B0" + "W"; }
    	else if (longitude > 0) { textLong = Math.round(longitude*100)/100 + "\u00B0" + "E"; }
    	else { textLong = Math.round(longitude*100)/100 + "\u00B0"; }
    	prevlatitude = latitude;
    	prevlongitude = longitude;
    
    	// GET WOEID FOR THE NEW LOCATION
    	var url = 'http://query.yahooapis.com/v1/public/yql?q=select * from geo.placefinder where text="'+latitude+','+longitude+'" and gflags="R"&format=json';
    	$.getJSON(url, function(data) {
    	found = data.query.count; // Check if coordinates return a valid localization.
    	if ( found == 1) {
    		var woeid = data.query.results.Result.woeid;
    		city = data.query.results.Result.city;
    		neighborhood = data.query.results.Result.neighborhood;
    		county = data.query.results.Result.county;
    		
    		if (UseNeighborhood == true) {
    			if (neighborhood != null) { city = neighborhood; } else { city = county; }
    		}
    		
    		// GET OLD LOCALE FROM WOEID
    		var url = "http://weather.yahooapis.com/forecastrss?w="+woeid+"&u=f";
    		$.get(url, function(data) {
    		title = $(data).find('title').text(); // Check if a city is found.
    		if (title != "Yahoo! Weather - ErrorCity not found") {
    			gps = true;
    			zip = $(data).find('guid').text().split('_')[0];
    			if ( ((UseCityGPS == false) && (UseNeighborhood == false)) || (city == null) ) { city = $(data).find('location').attr('city'); }
    			TextColor = "TextColorGrey";
    			weatherRefresherTemp(zip); // Refresh weather as specified in Config.js.
    		} else {
    			if ( xmldata == false ) {  // Back to locale, but keep the 20s refresh for GPS localization.
    			gps = false;
    			TextColor = "TextColorGrey";
    			validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal);
    			} else {
    			gps = true;
    			TextColor = "TextColorRed";
    			weatherRefresherTemp(zip); 	// Keep the latest valid zip to update the weather.
    			}
    		}
    		}).error(function() {
    		if (xmldata == false) {
    		dealWithWeather ({error:true});
    		} else {
    		document.getElementById("coordinates").className = "TextColorRed";
    		document.getElementById("coordinates").innerHTML = "[Offline]";
    		}
    		});
    	} else {
    		if ( xmldata == false) { // No data. Keep weather or back to locale, maintain the 20s refresh for GPS localization.
    		gps = false;
    		TextColor = "TextColorGrey";
    		validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal);
    		} else {
    		document.getElementById("coordinates").className = "TextColorRed";
    		document.getElementById("coordinates").innerHTML = "[Offline]";
    		}
    	}
    	}).error(function() {
    		if (xmldata == false) {
    		dealWithWeather ({error:true});
    		} else {
    		document.getElementById("coordinates").className = "TextColorRed"; 
    		document.getElementById("coordinates").innerHTML = "[Offline]";
    		}
    	}); 
    }
    }).error(function() {
    clearTimeout(refreshLocationTimer); // No myLocation.txt file, stop GPS mode.
    gps = false;
    TextColor = "TextColorGrey";
    validateWeatherLocation(escape(locale).replace(/^%u/g, "%"), setPostal);
    });
    }
    As you see there is an error function as well incase it can't read the location.txt. Pretty much recode this entire location.js

    You say it will release 100's of widgets yet all these widgets do way to much work. Changing the way this works will be beneficial to battery and phone processes. Which in turn is better for every user. IMO I would take one of my weather widgets and use it. Adjust css to your specific need. I guess thats wishful thinking. I did code them to provide the best base for iWidgets. With way more options. (Besides Neighborhood) As I said earlier if you want to use these WidgetWeather widgets then install widget weather. Of course it will do more work than needed, but then again you don't have to touch any code.

    Or

    You could ask the creators to support LockBuilder way of using its build in GPS. Which is a lot less for the phone to do to pull coordinates. It already does this once when LB loads from the built in Location Services, and does it immediately rather than reading/loading a text file. Just doesn't seem right to need to get a file from .txt when its already there loaded and stored.

    localStorage.getItem is a whole lot faster than jQuery.get or the equivalent $.ajax({

    jQuery/Ajax speeds

    Using this way to pull a .txt then a function along with it more than likely means the dom is changed more than once. If you look at lockbuilders request to get an xml it doesn't continue with code until the xml was successfully pulled. When $.ajax runs it continually runs code after the .ajax function.

    Example.
    Code:
    $.ajax({
        url: url1,
        success: function (e) {
      link= $(e).find("guid").text();
      link=link.split('_');
      locale = link[0];
      GetXmlFeed(locale);
      var sCityCodes = locale;
      localStorage.setItem('apiLocale',sCityCodes);
      randomsave=Math.floor(Math.random()*101);
      localStorage.setItem('randomsave',randomsave);
    
        }
    });
    You see a successful function. This only runs the code inside after it is successfully pulled. You can really test the time it takes for this file/url to be loaded by putting an alert inside the successful function. Reason I know it is slower than pulling from localStorage.

    Example 2
    Code:
    $.ajax({
        url: url1,
        success: function (e) {
        }
    });
    
    alert("test");
    Example 3
    Code:
    alert("test");
    alert("test");
    Example 2 shows the get function and an alert right after. Unlike you would think the alert("test"); will run even though the .ajax isn't finished. Therefore loading anything below it. If this changes dom elements then once it is finished it will need to redo the changes.

    Example three shows two alerts. The first will go, then the second in order. Just like functions.
    Code:
    test1();
    function test1(){}
    test2();
    function test2(){}
    test2 will never load until test1 is finished. Just some things to take into consideration using .ajax or .get

    Everything in javascript will run top to bottom. Except this specific case of .get or .ajax or any similar pull.



    About Neighborhood. All it does is go to the original xml and pull what is called town/neighborhood instead of city. I was blamed for stealing the idea of neighborhood when I implemented in LockBuilder for iOS7. Reason I didn't add it. Just to keep the peace. If it would satisfy users I will add it to LBEvo when I get time to go through LB code. It has no difference with weather details. Just because it shows a town, doesn't mean it will be more accurate still uses the same Weather XML to parse.
    Last edited by June'sIphone; 2014-06-07 at 07:05 PM.

  9. #569
    Now I know this, that's what I'll do. It'll help increase my coding knowledge into the bargain.
    Thank you yet again!


    Sent from my iPhone using ModMyi

  10. #570
    Quote Originally Posted by NeilJClements View Post
    Now I know this, that's what I'll do. It'll help increase my coding knowledge into the bargain.
    Thank you yet again!


    Sent from my iPhone using ModMyi
    Anytime

  11. #571
    For some reason LBEvo has stopped collecting weather data and so have the iWidgets configured to use the gps from LBEvo. I have checked everything and even reinstalled. Anyone know if there's a problem with the data feed?


    Sent from my iPhone using ModMyi

  12. #572
    "Yes, I jailbreak" c0pes321's Avatar
    Join Date
    Jan 2014
    Location
    New Jersey
    Posts
    197
    Thanks
    434
    Thanked 443 Times in 132 Posts

    LBEvo weather data seems to be working fine today.

  13. #573
    I don't understand it. I've done nothing and it's stopped. Everything else is ok. Ok, thank you. I know the fault is my end so I can start investigating.


    Sent from my iPhone using ModMyi

    Ok, was working last night, woke up and it's not working. All other weather widgets working perfectly.
    I've removed and reinstalled, checked all the settings and nothing, nada, squat.
    Any ideas?


    Sent from my iPhone using ModMyi

    Ok, this must be a clue: iWidgets that previously ran using the call to the LBEvo GPS now don't work and instead display INTERNET!!
    Suggesting there is a connection problem from the app.
    Where do I look from here anyone?


    Sent from my iPhone using ModMyi
    Last edited by NeilJClements; 2014-06-08 at 05:40 PM.

  14. #574

  15. #575
    Ok, I really am stuck. Any clues where I should be checking?


    Sent from my iPhone using ModMyi

    Ok, that's weird. Not touched it and it's started working again, minus the weather icon and description elements.
    Turned them on and off and even tried changing the weather icon but I just get that white square outline like the file is missing?
    There is gremlins afoot :-/


    Sent from my iPhone using ModMyi
    Last edited by NeilJClements; 2014-06-08 at 06:51 PM.

  16. #576

  17. #577
    Pfft!


    Sent from my iPhone using ModMyi

  18. #578
    My iPhone is a Part of Me Poolman1's Avatar
    Join Date
    Apr 2011
    Location
    Delaware
    Posts
    631
    Thanks
    2,769
    Thanked 749 Times in 352 Posts

    Mine is working fine also, you must have gremlins like you said. LolImageUploadedByModMyi1402246988.657828.jpg

  19. The Following User Says Thank You to Poolman1 For This Useful Post:

    June'sIphone (2014-06-08)

  20. #579
    ImageUploadedByModMyi1402247089.802900.jpg

    This is what I get. Description not working and the weather icon as shown. It is the third choice down on the weather icon list.



    Sent from my iPhone using ModMyi

  21. #580
    My iPhone is a Part of Me Poolman1's Avatar
    Join Date
    Apr 2011
    Location
    Delaware
    Posts
    631
    Thanks
    2,769
    Thanked 749 Times in 352 Posts

    Just changed mine to the one you are trying to use and is working fine.ImageUploadedByModMyi1402247473.135474.jpg

  22. The Following User Says Thank You to Poolman1 For This Useful Post:

    NeilJClements (2014-06-08)

Page 29 of 68 FirstFirst ... 19272829303139 ... LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •