Android and JNI real time clock
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I got a problem with a mini Android application and the use of real time clock signals in a C (JNI) function. It seems like Android UI doesn't like real time signals from timers instanced in a C function. In the following PoC , a timer trigger a signal 5 times per second and if the signal is triggered while the UI is updating, the application crashes. If i don't start the timer => no crash If i don't put anything on UI => no crash I wrote this little PoC to evidence the behaviour. Java part just call the JNI function and put a button on