Page 6 of 9 FirstFirst ... 45678 ... LastLast
Results 101 to 120 of 171

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


Thread: MYO5 Lockscreen cydget for iOS 8

  1. #101
    Well, ......
    The GPS coordinates are from the WeatherFramework. I think it uses the same mechanism as WW2, which uses the stock Weather App which uses the WeatherFramework. And that is where the cycript code hooks into and gets the latitude/longitude from the WeatherFramework.
    I can not influence any of this (at least with my knowledge of cycript) on how the WeatherFramework will determine the GPS position.
    However I found that it has been very accurate (a couple of meters off is still OK) in most cases, but it can be off by a few hundred yards, it all depends on what method the iPhone/iPad use to determine the GPS position for the Weather App.

    There is an alternative, whereby you use the CoreLocation Framework instead of hooking into the WeatherFramework, BUT this has been tightened in iOS 8, as you need exclusive permission to access location services. There are code requirements that go into the Info.plist file of apps to allow possible location access, but shell scripts to not use Info.plist files.
    Read this article for further information, Core Location Manager Changes in iOS 8 - nevan.net
    Initially I used the CoreLocation Framework (code on June's blog), but it would only work once, then you had to manually allow "Always" access in the Settings menu to get one more GPS position (upto 14 decimals!!!), then manually allow "Always" access in Settings menu for one more and so on.
    Sadly I have not found a solution to allow a shell script full "Always" access to location services due to lack of Objective-C and cycript knowledge.
    By hooking into the WeatherFramework I do not need location access, I just take what the Weather App has already done, determine the GPS position.
    Last edited by rasputin007; 2015-03-11 at 09:45 PM.
    Nothing is impossible only miracles take a bit longer!

  2. The Following User Says Thank You to rasputin007 For This Useful Post:

    King_O_Hill (2015-03-14)

  3. #102
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,734
    Thanks
    8,351
    Thanked 16,486 Times in 7,705 Posts

    Default MYO5 Lockscreen cydget for iOS 8
    Weird.. I'm hoping maybe it was just a fluke. Been testing on road since then - and it seems just fine now.. I'll let you know when I get home tonight.

    Thanks, Ras! Excellent tool!
    Grant

  4. The Following User Says Thank You to NewD For This Useful Post:

    rasputin007 (2015-03-12)

  5. #103
    I am glad you enjoy it.
    Let me know if there is any problem, as I have it turned off atm. I have no theme/widget that can read the address.xml file (yet).
    Congratz on becoming golden.
    Nothing is impossible only miracles take a bit longer!

  6. The Following User Says Thank You to rasputin007 For This Useful Post:

    King_O_Hill (2015-03-14)

  7. #104
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,734
    Thanks
    8,351
    Thanked 16,486 Times in 7,705 Posts

    Thanks, Ras. And thanks for all you've taught me about API's and parsing data.

    One problem arising .. I've been getting a lot of "over query limit" error messages in the xml last several days (see below). Can you "double check" it's really set to 45seconds? Every 45 seconds should come out to only 1980 calls a day and Google's cap is 2500.. Any thoughts as to what might be up?


  8. #105
    Yes, the time interval is set to 45 seconds.
    See /Library/LaunchDaemon/com.gps.location.switch.plist.
    Code:
    <key>StartInterval</key>
    <integer>45</integer>
    What might happened is that you use other widgets that also make calls to Google which would count towards your total daily limit.
    Nothing is impossible only miracles take a bit longer!

  9. The Following User Says Thank You to rasputin007 For This Useful Post:

    King_O_Hill (2015-03-14)

  10. #106
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,734
    Thanks
    8,351
    Thanked 16,486 Times in 7,705 Posts

    Quote Originally Posted by rasputin007 View Post
    Yes, the time interval is set to 45 seconds.
    See /Library/LaunchDaemon/com.gps.location.switch.plist.
    Code:
    <key>StartInterval</key>
    <integer>45</integer>
    What might happened is that you use other widgets that also make calls to Google which would count towards your total daily limit.
    Nope. No other widgets in over a week. This only started happening since I installed your widget. Just to make very sure. What are the items I need to uninstall to stop the calls to Google from your widget? Which items do I uninstall?

  11. #107
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,734
    Thanks
    8,351
    Thanked 16,486 Times in 7,705 Posts

    What's really really interesting… Is that when I enter the API address in mobile Safari on the same phone… It has no trouble at all giving me the results.?? How could that be? Is the Google API sensitive to what user agent is accessing its information?


  12. #108
    That is interesting!
    Uninstall with Cydia, I think it is called GPS Location or Google GPS.
    Or turn it off in Settings->GPS Location. That's what I do, turn it off when I don't need it and turn it on when I want it to run.
    It checks if the switch is On or Off, then it either (On) gets the GPS and makes the call or when "Off" it exits without getting GPS or making the Google call.

    Try a reboot and see what address.xml is like.
    Last edited by rasputin007; 2015-03-13 at 10:18 PM.
    Nothing is impossible only miracles take a bit longer!

  13. The Following 2 Users Say Thank You to rasputin007 For This Useful Post:

    King_O_Hill (2015-03-14), NewD (2015-03-13)

  14. #109
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,734
    Thanks
    8,351
    Thanked 16,486 Times in 7,705 Posts

    Default MYO5 Lockscreen cydget for iOS 8
    Can no longer get Google's API to return a response other than OVER QUERY LIMIT on my phone when in LTE/3G mode. When I'm on a Wi-Fi system everything works as normal. It would seem Google has permanently blocked my MAC address on my phone when accessing from a widget or your tweak. When accessing from mobile Safari I'm able to get data easily. Evidently they blocked me by navigator userAgent. I've got to find some JavaScript code now to feign that I'm using mobile Safari when I'm asking for the data from my widget. Either that or go get a new Sim card that should fool them into thinking it's a new phone.

    But while you think on that conundrum for me- have you had any trouble with your WUG tweak lately? All I'm
    Getting these last 3 days in mywug.xml is this..


    Yes, there're coordinates in both gpslat and gpslong.txt.

  15. #110
    Both are still working for me, on iPhone and iPad Mini.
    But then I mostly have GPS Location turned off as I still do not have any use for the address.xml. However when I turn it on it works perfect.
    The GPS & WUG is running since day one on both, iPhone and iPad, and they work fine. Occasionally the update stops, don't know why, but a reboot later and it is back to running fine.

    Your MAC address is not blocked as otherwise mobile Safari would give you the same result. The MAC address is device unique, even changing the sim card will not change the MAC address.
    The reason why it works when using WiFi might be that your iPhone has a "private" IP address (192.168.x.x or 10.0.x.x) within the WiFi network and all the outside will see is the public IP address of the WiFi gateway. If on LTE/3G your iPhone will use your providers gateway to connect to the internet, I think (no public iP address, as there would not be enough free available public IP addresses around for all smartphones). Not sure how it works exactly.

    btw GPS & WUG uses lat.txt and long.txt, gpslat.txt and gpslong.txt are being used by GPS Location.
    Nothing is impossible only miracles take a bit longer!

  16. #111
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,734
    Thanks
    8,351
    Thanked 16,486 Times in 7,705 Posts

    My phone's definitely being blocked.. when on LTE/3G.. Somehow they're detecting the user agent since mobile safari works on LTE/3G fine.. But not your address.xml nor when my widget calls the live api. Over on my 5S moving my SIM card over it works fine!! So it's tied to userAgent and MacAddress - that's the only logical explanation..

  17. #112
    Quote Originally Posted by NewD View Post
    My phone's definitely being blocked.. when on LTE/3G.. Somehow they're detecting the user agent since mobile safari works on LTE/3G fine.. But not your address.xml nor when my widget calls the live api. Over on my 5S moving my SIM card over it works fine!! So it's tied to userAgent and MacAddress - that's the only logical explanation..
    Not sure about that, but then I don't know what userAgent lynx would have as it is a command line browser, no GUI or API.
    Would be interesting to try, but don't do it!!
    Have a html page with the url call, javascript and css part to display the address with a page refresh interval of 45 seconds, open in mobile safari and wait how long it takes until you get the same error message.
    Nothing is impossible only miracles take a bit longer!

  18. #113
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,734
    Thanks
    8,351
    Thanked 16,486 Times in 7,705 Posts

    Quote Originally Posted by rasputin007 View Post
    Not sure about that, but then I don't know what userAgent lynx would have as it is a command line browser, no GUI or API.
    Would be interesting to try, but don't do it!!
    Have a html page with the url call, javascript and css part to display the address with a page refresh interval of 45 seconds, open in mobile safari and wait how long it takes until you get the same error message.
    How do I set up what you describe in the last paragraph there?

  19. #114
    Quote Originally Posted by NewD View Post
    How do I set up what you describe in the last paragraph there?
    One question.
    When you use the url call in mobile Safari do you use "https....."?
    I am asking as lynx uses the "unsecure" "http...." url, lynx does not work with "https...", gives error message.

    Now to your question. There might be a problem as mobile Safari does not read local html files by default, unless mobile Safari has been tweaked.
    Therefore I uploaded a simple index.html page on our MMUS server, GPS data, which you can visit.
    The page refresh timer is set to 10 seconds, which gave me just enough time to walk from the living room into the kitchen, by which time the refresh gave me a different address. LOL

    I also attached the same index.html file.
    As I said, just a very basic and simple file.
    Attached Files Attached Files
    Nothing is impossible only miracles take a bit longer!

  20. #115
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,734
    Thanks
    8,351
    Thanked 16,486 Times in 7,705 Posts

    Quote Originally Posted by rasputin007 View Post
    One question.
    When you use the url call in mobile Safari do you use "https....."?
    I am asking as lynx uses the "unsecure" "http...." url, lynx does not work with "https...", gives error message.

    Now to your question. There might be a problem as mobile Safari does not read local html files by default, unless mobile Safari has been tweaked.
    Therefore I uploaded a simple index.html page on our MMUS server, GPS data, which you can visit.
    The page refresh timer is set to 10 seconds, which gave me just enough time to walk from the living room into the kitchen, by which time the refresh gave me a different address. LOL

    I also attached the same index.html file.
    As I said, just a very basic and simple file.
    That website you give me fails when I try to access it on a browser or mobile safari - see below.. And his am I supposed to parse data from the index.html you sent me? I need more details my friend..

  21. #116
    Works on iPhone, iPad and MacBook, Safari and Chrome.
    Do you have Location Service enabled for Safari?
    The attached file is the same file as on the server, just in case you wanted to have a look at it.
    Nothing is impossible only miracles take a bit longer!

  22. #117
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,734
    Thanks
    8,351
    Thanked 16,486 Times in 7,705 Posts

    Quote Originally Posted by rasputin007 View Post
    Works on iPhone, iPad and MacBook, Safari and Chrome.
    Do you have Location Service enabled for Safari?
    The attached file is the same file as on the server, just in case you wanted to have a look at it.
    Okay. It worked on mobile safari once I turned on LocSvcs for Safari.. But still won't work on any browser on my computer. You'll want to change the refresh from 10sec to more like 45 or you'll exhaust the 2500 calls per day to Google.

    Or is that 10 seconds just a refresh of data you're pushing to the index.html?

    And how will I get all the data from the response I need? You just give me formatted address field [0]. I use a lot more of the feed than that..
    Last edited by NewD; 2015-03-22 at 12:15 AM.

  23. The Following User Says Thank You to NewD For This Useful Post:

    rasputin007 (2015-03-22)

  24. #118
    That's why I attached the file as well for you to mess around with.
    The refresh is in the metatag. As I said it is a very basic example, you can add whatever you need from the xml file, I only picked the formatted_address[0].
    Regarding browsers on computers, this is a funny thing. On my MacBook Safari gives me my exact location and address, but Chrome gives me an "IP-address" based location and address, which is way off my actual location.
    Anyway that link is more for smartphones/tablets which have a GPS chip.
    Nothing is impossible only miracles take a bit longer!

  25. #119
    Code Dependent NewD's Avatar
    Join Date
    Jan 2012
    Location
    Northeast US
    Posts
    5,734
    Thanks
    8,351
    Thanked 16,486 Times in 7,705 Posts

    Ok Ras.. I know I can grab other things in your index.html.. I'm just now sure how this is gonna solve my problem of being locked out by Google on my MAC address. I see how you've used mobile safari to get the data. But I need to get the data into my widget..

  26. #120
    Quote Originally Posted by NewD View Post
    How do I set up what you describe in the last paragraph there?
    The index.html file was made in response to your question, apart from that it does not really help you otherwise. LOL

    You think Google has blocked your MAC address, but yet if you use that url call in mobile Safari it works. Does not matter if lynx, safari, chrome or any other browser makes that url call, they all will have the same MAC address.
    OK, then you suspect the UserAgent to be the factor that causes the block.
    Well, this is how you can test this.
    You change the UserAgent to become Mobile Safari 8.0 rather then lynx. You know the url call in mobile Safari works so lets see if lynx can make that url call by pretending to be mobile safari.
    In /usr/bin you have an "address-gps.sh" executable shell script file. In that file you have in the second last line this code
    Code:
    lynx -source "http://maps.googleapis.com/maps/api/geocode/xml?latlng=$LAT,$LNG" > /var/mobile/Documents/address.xml
    Change this to
    Code:
    lynx -source -useragent="Mobile Safari 8.0" "http://maps.googleapis.com/maps/api/geocode/xml?latlng=$LAT,$LNG" > /var/mobile/Documents/address.xml
    If lynx does the url call now it will have the UserAgent Name "Mobile Safari 8.0" and no longer lynx.
    Then tap address-gps.sh in Filza to run it (provided the GPS Location menu in Settings is turned On) and check the address.xml in /var/mobile/Documents folder.
    If there is still the query limit error, then the UserAgent is not the cause for the block.
    If the address.xml looks how it should look, then the UserAgent was the factor that cause the block.

    EDIT
    Here are 2 quotes from Wikipedia about MAC addresses.

    A media access control address (MAC address) is a unique identifier assigned to network interfaces for communications on the physical network segment. MAC addresses are used as a network address for most IEEE 802 network technologies, including Ethernet and WiFi.
    According to Edward Snowden, the National Security Agency has a system that tracks the movements of everyone in a city by monitoring the MAC addresses of their electronic devices. As a result of users being trackable by their devices MAC addresses, Apple Inc. has started using random MAC addresses in their iOS line of devices while scanning for networks. If random MAC addresses are not used, researchers have confirmed that it is possible to link a real identity to a particular wireless MAC address.
    Last edited by rasputin007; 2015-03-22 at 07:08 PM.
    Nothing is impossible only miracles take a bit longer!

Page 6 of 9 FirstFirst ... 45678 ... 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
  •