Ever wanted to know your wan IP address ?
add the jNashorn library and add all these lines.
or using jScriptEngine library (system javascript engine if you don't have Nashorn)
(java 8)
add the jNashorn library and add all these lines.
B4X:
Dim nash As jNashorn ' dont forget to include jNashorn Library
nash.evalString($"var myip; load('http://l2.io/ip.js?var=myip');"$)
Log(nash.engineGet("myip"))
B4X:
Dim js As jScriptEngine ' dont forget to include jScriptEngine Library
js.evalString($"var myip; load('http://l2.io/ip.js?var=myip');"$)
Log("JScriptEngine >>" & js.engineGet("myip"))
Last edited: