#include #include void android_main(struct android_app *state) { /* Declarations */ struct android_poll_source *source; int events; /* Code starts here */ app_dummy(); /* do stuff here */ while (1) { if (ALooper_pollAll(-1, NULL, &events, (void**)&source) >= 0) { if (source) { source->process(state, source); } } /* more stuff here */ } }