androidjs icon indicating copy to clipboard operation
androidjs copied to clipboard

How to transfer const from main.js to index.html

Open xprv17 opened this issue 3 years ago • 1 comments

Hi guys, im new here. Few weeks ago started using this framework and i like it :).

Since im new i really dont know how to send one variable from main.js back to index.html. I got function installed and i want to send some value from that function to index.html. I can see it can be done by using IPC (Inter Process Communication) but i really cant understand them and how you connect front processes with back processes.

So if anyone can explain to me and write some simple back.on, back.send, front.on, front.send examples i would really really appreciate it.

Thanks a lot :)

xprv17 avatar Mar 07 '22 05:03 xprv17

see the video at https://www.youtube.com/watch?v=QplPXM0lhKA&t=1012s todo method front.send('[method Name]', ... has an automatic calback front.on('[methodName]-result',... method name followed by -result

image

Level0r0s avatar Mar 07 '22 12:03 Level0r0s