SDL2, Android

Maybe a stupid question, but:

I create SDLActivity instance in another activity, everything works fine.

SDLIntent = new Intent (this, SDLActivity.class);

and later

startActivity(SDLIntent);

However, if I pass some values via JNI function immediatly after startActivity it crashes, probably because the code in main() isn’t yet up and running? If I pass them a little bit later, everything is OK.

How do I know when everything (I mean my main() native body) is fired up and running?

You need to extend SDLActivity and call your functions inside it, or even within your native library itself.