I'm developing an android extension using 3rd party library for communicating with chip & pin device.
I've managed to connect to symulator device and to receive events from device in java code.
Now I need these events to be fired in ruby/javascript and my idea is to implement it via callback to ruby view.
What I've done is to use native callback java method from com.rhomobile.rhodes.camera.Camera; by actually removing the method from Camera.Picture private class and moving it to Camera class directly.
Then I can import the Camera class and use it as following:
import com.rhomobile.rhodes.camera.Camera;
... some class declarations and methods...
Camera.callback(this.callbackUrl, "event=endOfTransaction&status=authorised");
and everything works as expected.
I've achieved that by changing open source part of Rhodes, more precisely the Camera class. Can you help me in achieving the same functionality without changing the rhodes sources?
Best regards,
Krystian Sikora
1 Replies
Hi
Writing extension is the best way to achieve it and you can check the nice tutorial at http://docs.rhomobile.com/en/5.0.0/guide/native_extensions
The link got also a section called Using callbacks http://docs.rhomobile.com/en/5.0.0/guide/native_extensions#using-callba…
Thanks
Visnupriya
Kutir Mobility