I'm new to Processing and Android, although not to Java, and have been experimenting with Bluetooth between my Mac and Android phone successfully. I'm not using the Ketai library, but rather have opted to use the Android libraries directly at this point.
Now I want to add some sort of state information to my sketch, and it seems from some research, that the Android Activity methods onSaveInstanceState(...) and onCreate(...) are the places to save/restore this.
However, onCreate(...) does not appear to be called within my sketch as far as I can tell. I have overridden and placed println() statements in the various Activity methods - onStart(), onStop(), onPause, onResume(),onSaveInstanceState(...), onRestoreInstanceState(...) - and all these are getting called at various points, but not onCreate(...) or if it is, I get no println() output.
I could use onRestoreInstanceState(...) and place my code there, but I'm a bit confused why onCreate(...) is not called. Incidentally I looked at one of the Ketai example sketches (BluetoothCursors), and that does use the onCreate(...) method.
Could anyone enlighten me?
Many thanks
*** UPDATE ***
After posting this, I looked in the processing source code for PApplet, and of course, since it extends Activity, onCreate(...) does of course get called, but for some reason the println() I placed inside the method does not show up in the Processing IDE.
However, I set the value of a String inside onCreate() and printed the content in onStart(), and that proved that it was indeed called.