Using WebView I plan to build an on-device front end opening web page to the proposed application. However, I would like the user's link on the opening web page to automatically capture the Lat/Lon of the device so the user can automatically connect to the 'local' content I will have available on my ISP server REST php page.
The pertinent code of the link of on-device opening web page might look like this:
- Code: Select all
<a href="http://ctlss.com/cfyi/REST/content.php?lat=$device-lat&lon=$device-lon">Local Content Near You Now</a>
$device-lat = device latitude coordinate (decimal value preferred) and $device-lon = longitude.
Through tutorials I believe I can manage to build the on-device opening web page but I feel less confident how to get the device lat/lon happily sitting in the GET string link to trigger the appropriate REST response.
For the curious (and prototype) if you were standing in the Lower East Side of New York City and you clicked through the device opening screen you might eventually discover a page like http://ctlss.com/cfyi/
I feel someone must have done this several times before and I would greatly appreciate any pointers to sample code.
Many thanks, Steve