Javascript doesnt work in datawedge and chrome

M Mart Madisson 2 years 11 months ago
337 1 0

Hello!
I am not able to use TC2X scanner on android(TC20) using Datawedge and chrome. I followed https://www.zebra.com/us/en/support-downloads/knowledge-articles/evm/Con... tutorial for enabling chrome and used such javascript code:

function registerIntent() {
EB.Intent.startListening((myIntentData) => {
console.log("data: ", myIntentData);
});
}

After page is loaded the javascript alert pops up with the content:
{"method": "useNewOrm", "params": [], "__rhoClass":"Rho.NewORM", "_rhoID":"0","jsonrpc":"2.0","id": 0}
If i remove EB.Intent.startListening and load only ebapi-modules.js then behaviour is same(alert is shown). I suspect that something is wrong/missing in enabling chrome in Datawedge.
If i used the same javascript code in EB browser + Datawedge then its working as expected. Did i do everything correctly?

CONTACT
Can’t find what you’re looking for?