Why Is My Activity Restarting Automatically?
I am beginner in android app development. Recently, started to develop a chat app. I achieved basic functionality of client server message exchange. I am facing an issue that andro
Solution 1:
Automatic restarting of activities is expected under many circumstances, including rotation, screen size changes, locale changes, etc. You can override this behavior in the manifest.
Its a crappy way of doing things, but we're stuck with it.
Solution 2:
Yes there is a problem with emulator for Lollipop in android studio 1.0 and Ubuntu 14.04. It was giving following error:
12-2115:47:02.5121900-1916/chat.com.android_client W/EGL_emulation﹕ eglSurfaceAttrib not implemented
12-2115:47:02.5121900-1916/chat.com.android_client W/OpenGLRenderer﹕ Failed toset EGL_SWAP_BEHAVIOR on surface 0xa6da4140, error=EGL_SUCCESS
Because of this onCreate() was getting called twice in this case.
I switched to KitKat emulator and it is fine now.
Post a Comment for "Why Is My Activity Restarting Automatically?"