javascript out parameter value to local variable in mobile screen

I have integrated a plugin and in that plugin, a function returns text value on call. Now I'm saving the value in the variable in that action and returning the value from the action and then assigning the value back to the local variable in the screen

But not able to resolve the issue of displaying the value on the screen



Hi Kirit.

What exactly is the problem to show the local variable in the screen?

How are you doing it?


Hi EJ,

I'm doing great, How about you

Yes to show the value fetched from the scanner on the screen.

I'm attaching oml for reference.



Hi Kirit,

without digging to much in the code you provided. You might be missing the $resolve(); call in your javascript code.

You can inspect the Barcode Plugin and check how they're doing it. Also there's some documentation about Asynchronous JavaScript Code here, that's worth reading.