I'm playing with an application based on the Professional Android Developers book "Compass" example. Since is uses the "compass" with the 1.5 SDK it has to debug on the G1.
The application loads and goes through onCreate, onResume, etc. A worker thread which does the drawing is created in the SurfaceHolder surfaceCreated call back. If the G1 is active (display on) this works fine. If the G1 is idle (screen dark) it gets weird because the thread starts but the various Paints it needs are null. The way it is written it just loops waiting for a non-null paint. The subroutines that created the Paints did run, however. Justa another tidbit: The LogCat shows "AKMD Application OPEN" and then "AKMD Application CLOSE" intermixed with my Log statements about the application progress. Once I activate the display the thread finds the Paints and start to run. Then it operates properly. I did check and surfaceDestroyed is _not_ called. There is a call to surfaceChanged. I'm just posting this for information or discussion since I don't like the thread being started in the surfaceCreated call back so will be changing the overall structure of the application. This weirdness should only appear in this debug situation because only then is the screen dark when an application starts. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

