I am playing with a simple app i found over the internet that capture the preview frame of the camera, process it (find all the edges, for example) and re-display it (it draws on the canvas only some pixels, so that on the screen i see the camera preview frame slightly modified with image edges overimpressed on it). It works, but when the application resumes, sometimes only the frame preview is displayed correctly, but the image processing output not. I have implemented an "open the browser" functionality: when the user touch the screen the application pauses, the browser gets called, and when the user close the browser the application continues to work. The problem is that all the drawing calls (draw bitmap, draw text and so on) on the canvas does not work anymore. Only the preview camera frames continue to be displayed correctly.
Now, this happens only when i returns from the browser to the app. The thing i have noticed is that if one returns from the browser to the app in portrait mode, all works correctly. If one returns to the app in landscape mode, there is the problem above. The application activity calls setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) in the method onCreate(). Ps. My app has two classes. The main activity class and the surface class, that extends SurfaceView and implements SurfaceHolder.Callback. I have read that, when the orientation change, the surface view is destroyed. When it happens (that is, when the app pauses, i change to portrait mode and return to the app), all works ok. When it does not happen (that is, i pause the app when i am holding the phone horizontally, work with the browser and return to the app always keeping the phone horizontal), the problem arises. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en