I am getting error when I rotate the device (it was HTC with Verizon):
The application My App (process com.mycompany.android) has
stopped unexpectadly. Please try again.
So, I think I need to code for this issue. In order words, when rotate the device from landscape to portable or from portable to landscape, application needs to catch this event.
Is it right ?
How to make it ? What is wrong here ?
Edit: Is it possible to test on the emulator ?
Thanks in advance.
By default Android activities are shut down and restarted on a configuration change. The easiest way to get around this is to add android:configChanges the the application manifest. This will tell Android that you will handle the listed config changes yourself. For example
In your manifest means the activity will not restart on an orientation change or if the user has slid out a keyboard.