Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NativeActivity does not finish

Tags:

I call a NativeActivity from a JavaActivity. The entry point of my NativeActivity is

 android_main(struct android_app* state)

At the end of this, I call

 ANativeActivity_finish

However my native activity just hangs, instead of returning to the Java Activity that called it (it was called simply using startActivity). It seems like it is in a pause state. The only way I can get it to return to the previous activity is by calling exit(0) at the end of my android_main, however this kills the process and causes other issues.

How can I successfully exit my NativeActivity and return to the JavaActivity that called it?