--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/1ffdbbaa-5944-4ff2-8f9d-04d69ef3f711%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
If your native source is Android, declare a static object in a CN1 class and use it as hook to call CN1 code directly from your native side.
On Sun, Nov 2, 2014 at 12:15 AM, <jam...@fastlaneinnovations.com> wrote:
I'm having trouble understanding how to fully use the native interface. I have the interface defined with some methods, and am implementing code in the native stubs to carry out the methods, but I need information to pass both ways. I'm working on the Bluetooth LE functionality, and it uses some callbacks to respond to data that gets received from a peripheral device.
It's unknown when this will occur, so the callback is called by the Bluetooth adapter when this happens and the data is then stored in a class field of the native class. How do I get the main CN1 program to know when the callback inside the native code has been triggered? I can't pass a reference to the native class from other CN1 non-native objects (can I?), do I somehow assign some listener to some invisible text field or something like that?
In general, I can see that it's easy for the CN1 code to call the native interfaces that I set up, but how do I go the other way and have the native code cause something to happen in the CN1 code?
--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/1ffdbbaa-5944-4ff2-8f9d-04d69ef3f711%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--David Wafula
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/2cca81cd-6052-4a0b-b3d2-329af594cd7e%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/CAK9Ws2ey0%2B0VSDg3zJ4VZ_Kw1W11n3iVZ79VvOYtAmL9OJrfhg%40mail.gmail.com.