7

Actually my problem is the same as the question posted in : the same problem

But there is no answer yet..

Here is the problem I got :
I've just built an application using sencha touch & phone gap. It runs well on my galaxy tab but when I rotate it to portrait or landscape, it is going crash.
I have added :

android:configChanges="orientation|keyboardHidden"

on my manifest file but it is still going crash when I rotate it.

I don't know how could this happen.
Could someone help me?


Note :
I'm using
- Galaxy tab
- Sencha-touch 1.1
- Phone gap 1.2

Community
  • 1
  • 1
Yagi
  • 511
  • 2
  • 5
  • 19
  • 2
    Please post the Logcat messages. – Karthik Jan 04 '12 at 09:34
  • Thanks Karthik for your reply :), but there are no any errors in the Logcat. It's suddenly closed without any errors or notifications. Any solutions for this? – Yagi Jan 04 '12 at 09:49
  • 1
    oh, so by crash you mean the app restarts? because if it crashes, there should be some exception. See if you get any warning or info logs. – Karthik Jan 04 '12 at 10:14
  • Hi Karthik, I tried to recompile my application on different version of eclipse & upgrade my phonegap too 1.3, it works now.. But I don't know exactly what the problem is.., because when I tried to use phonegap 1.2 again, it works. Hmmm.., i don't know if it is about eclipse version. Thanks for your support Karthik :) – Yagi Jan 05 '12 at 02:35
  • Do you have different resources for landscape and portrait? it maybe because of some problem in compilation, the resources may not have been placed into the APK properly. I also have faced this issue. A clean build solves it. Anyway, welcome :) – Karthik Jan 05 '12 at 03:00
  • No, I don't have any different resources. I just follow the basic configuration from phonegap site and test it on my device :) – Yagi Jan 05 '12 at 05:47

2 Answers2

9

You should have

android:configChanges="keyboardHidden|orientation|screenLayout"

instead of

android:configChanges="orientation|keyboardHidden"

to your activity in the manifest

Maurizio Pozzobon
  • 3,044
  • 7
  • 34
  • 44
8

Might be a bit late... but since I've recently been trying this, I found that specifying

android:configChanges="orientation|screenSize|keyboardHidden"

works where as

android:configChanges="keyboardHidden|orientation|screenLayout"

does NOT.

I'm using cordova 2.0.0.

user1137874
  • 81
  • 1
  • 1