Android native exnension using callbacks in RMS 4.1

K Krystian Sikora 3 years 6 months ago
0 1 0

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

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