Let's extend the previous example to step our application when events are processed.
jni/Types.hppand define a new type status to represent return codes:
#ifndef _PACKT_TYPES_HPP_ #define _PACKT_TYPES_HPP_ #include <cstdlib> typedef int32_t status; const status STATUS_OK = 0; const status STATUS_KO = -1; const status STATUS_EXIT = -2; #endif
jni/ActivityHandler.hppheader and define an "interface" to observe native activity events. Each possible event has its own handler method:
onDestroy(), and so on. However, we are generally interested in three specific moments in the activity life cycle:
onActivate(), invoked when the activity is resumed and ...