margret Well-Known Member Licensed User Longtime User Jul 9, 2011 #1 If I set a variable up in the java in Google Maps as listed below, is there anyway to read it from B4A? Code: Copy var map; var chicago = new google.maps.LatLng(41.850033, -87.6500523); I am looking to get the data out of the Java variable 'chicago' into one in B4A. Any libraries or other tricks that might work. One fact is they are both in memory on the device at the same time. Seems there should be a way.:sign0085: Thanks, Margret
If I set a variable up in the java in Google Maps as listed below, is there anyway to read it from B4A? Code: Copy var map; var chicago = new google.maps.LatLng(41.850033, -87.6500523); I am looking to get the data out of the Java variable 'chicago' into one in B4A. Any libraries or other tricks that might work. One fact is they are both in memory on the device at the same time. Seems there should be a way.:sign0085: Thanks, Margret
warwound Expert Licensed User Longtime User Jul 9, 2011 #2 Hi. You can use my JSInterface library to add a custom javascript interface to your WebView. Once that's done you can call B4A Subs (with data) from your javascript. http://www.b4x.com/forum/additional-libraries-official-updates/9893-jsinterface.html Basic4android - JSInterface The demo contains examples of sending data from B4A to javascript and from javascript to B4A. Martin. Upvote 0
Hi. You can use my JSInterface library to add a custom javascript interface to your WebView. Once that's done you can call B4A Subs (with data) from your javascript. http://www.b4x.com/forum/additional-libraries-official-updates/9893-jsinterface.html Basic4android - JSInterface The demo contains examples of sending data from B4A to javascript and from javascript to B4A. Martin.