Calling native method twice of third party library in an Activity causes the Android application to close down

So … my solution was starting a service that runs the shared library code, this service has a different process name ( you can set it in the Android Manifest ), as it is a different process you can kill it ( Using Process.killProcess(Process.myPid()) when it finishes running, without affecting your application in any way.

Worked very well for me, hope it helps someone else.

Leave a Comment