Playing around with Jappie Toutenhoofd ‘s scripts and trying to disintermediate Tasker with LL scripts …
Playing around with Jappie Toutenhoofd ‘s scripts and trying to disintermediate Tasker with LL scripts …
Has anyone successfully used a LL script to pull a geolocation (lat, lon) from Android’s location manager?
]]>« Is there a way of sorting the application drawer alphabetically and have the folders first, followed by the rest of… (Previous Post)
(Next Post) Title »
< ![CDATA[
No. But here is what should work: register a LocationListener to the Location System Service.
You need permissions for this though. Only way to get them is Lightning Permission Manager ATM.
]]>
< ![CDATA[
or use apicomm with http://ipinfo.io/json
]]>
< ![CDATA[
Jappie Toutenhoofd interesting. Requires network connection and is less accurate, but doesn’t require permissions.
]]>
< ![CDATA[
Thanks guys! Never thought about the IP method but it works. ipinfo wasn’t that accurate for me but looks like there are other options that are https://www.iplocation.net/
]]>
< ![CDATA[
Side question: what is the best way to auto-load scripts upon LL reload? I use Tasker to load APIcomm on boot, but for some reason when LL reloads it does not persist
]]>
< ![CDATA[
I just tried using the event “Desktop Load” to load APIcomm but it also doesn’t persist. Jappie Toutenhoofd might you have any suggestions (short of running APIcomm before each API pull)?
]]>
< ![CDATA[
i use desktop’s load-event. it only tends to stay at ‘self’ if all the rest is fault free. It seems stuff at self is the first you loose. Pierre warns for that at the wiki.
workarounds can be to test if
“typeof self.apicomm == ‘undefined’ “
also put a lot of try/catch(e)/toast(e) in your script.
]]>