Wikitude
play_for_work
Forum
FAQ
Documentation
Download
wikitude.com
How can we help you today?
Enter your search term here...
Search
Start a new topic
Discussions
Wikitude SDK (Android, iOS, UWP)
Wikitude SDK Questions or Problems
callJavaScript doesn't work on android
d
daichi hayakawa
started a topic
about 7 years ago
callJavaScript doesn't work on android
4 Comments
Oldest First
Popular
Newest First
Sorted by
Oldest First
d
daichi hayakawa
said
about 7 years ago
I am using wikitude titanium module 5.0.0
callJavaScript doesn't work on android.
in ArchitectWindow.js
function ARchitectWindow(WikitudeLicenseKey, url) {
var wikitude = require('com.wikitude.ti');
this.window = Ti.UI.createWindow({
backgroundColor: 'transparent',
navBarHidden: true
});
//
//
//
this.window.addEventListener('WORLD_IS_LOADED', function(event){
Ti.API.info("WORLD_IS_LOADED!!");
this.arview.callJavaScript("AR.logger.info('script called');");
}
}
Somehow It is called in iOS but not in Android.
In Both OS 'WORLD_IS_LOADED callback' is called successfully.
A
Andreas Schacherbauer
said
about 7 years ago
Hi daichi,
Have you tried to call `this.arview.callJavaScript("alert('test alert for android')")` to see if a very base JS call can be executed?
Best regards
Andreas
d
daichi hayakawa
said
about 7 years ago
Yes I have tried the simple javascript function alert('test') but in vain.
The same code works on iOS and popup appears..
I suspect ,WOLRD_IS_LOADED is fired before 'the AR is really loaded' ????
It lookes slightly faster to appear "WORLD_IS_LOADED!! on the screen than AR world appearing on device.
A
Andreas Schacherbauer
said
about 7 years ago
Can you try to put a setTimeout inside the WORLD_IS_LOADED event?
Best regards
Andreas
Login
or
Signup
to post a comment
More topics in
Wikitude SDK Questions or Problems
Instatiation of WTArchitectView compile errors
Point of interest - native iOS
Slider
Camera lagging / slow in native Swift application
Create a web service
N-th ImageDrawable not displayed
Radar Example
stop defaultlocationmanager and use architectview.injectlocation ios 10
WTC Size Limit
AngularJS and wikitude
See all 3861 topics
© 2021 Wikitude, a Qualcomm company
daichi hayakawa