I'm calculating my POI's geographical position (lat and long) in my Android game, and I need to pass this calculated data to my wikitude JS code somehow (where I'm populating the POI object) .
I can't do the calculation in the JS because the calculation relies on some libraries linked to my Android project.
Is there some kind of parameter passing system, where I can pass extra parameters via some object?
A
Andreas Fötschl
said
over 9 years ago
Hi there!
You may use urlListener to intercept JS calls in your native environment (compare POI detail page Samples). To pass back the calculated values from native to JS use "architectView.callJavascript('onValuesCalculated(12.3456)')" to e.g. execute globally accessible "onValuesCalculated" JS function.
Hope that helps.
Kind regards, Andreas
s
sanjeev mk
said
over 9 years ago
Thanks Andreas!
I ended up using a personal server to store my calculated values, and then used the Webservice to fetch the POIs. Kind a roundabout method.
I'll try the solution you've given.
s
sanjeev mk
said
over 9 years ago
Thanks Andreas, your solution worked perfectly for me!
sanjeev mk