android_guy android_guy - 3 months ago 18
C Question

Exit android app within native or from native

I want to exit the android app from native code. In java we do something like this:

System.exit(0);


Can this be done with Native C?

Answer

Use following,

#include <stdlib.h>
exit(EXIT_SUCCESS);

where EXIT_SUCCESS are the values specified by the standard to indicate successful termination.