in my Android app I have a native code that runs on separate thread, it use a while loop. The native code send data periodically to backend server using HTTP GET method. Now, I need the native code to also "send" data to my main Java UI thread.
My question is, how can I send some kind of an event or signal, that can be captured by the main Java UI thread, so that it knows when to perform some kind of action (updating the UI)? I know I can use JNI to call native code from Java side, but I do not know how to perform similar thing from native side to Java side.
Thanks guys!