--
You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
For more info on PhoneGap or to download the code go to www.phonegap.com
<uses-sdk android:minSdkVersion="2" />
Caution: Beginning with Android 3.2 (API level 13), the "screen size" also changes when the device switches between portrait and landscape orientation. Thus, if you want to prevent runtime restarts due to orientation change when developing for API level 13 or higher (as declared by theminSdkVersion
andtargetSdkVersion
attributes), you must include the"screenSize"
value in addition to the"orientation"
value. That is, you must decalareandroid:configChanges="orientation|screenSize"
. However, if your application targets API level 12 or lower, then your activity always handles this configuration change itself (this configuration change does not restart your activity, even when running on an Android 3.2 or higher device).
Run "adb logcat" so we can see what the root cause of the problem is.
Simon
I'm still getting this crash with phonegap 1.8.1, a 2.3 phone, and a 2.2 simulator.
My manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.yourgroup.yourname"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".HelloCordovaActivity"
android:label="@string/app_name" >
android:configChanges="orientation|screenSize|keyboardHidden"
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I am having exactly the same issue as Alberto. I have a minSdkVersion=10 targetSdkVerison=17. I've added PhoneGap's recommendation configChanges="orientation|screen|keyboardHidden"When I try to add "screenSize" I get an error message saying it is not a valid value.
I'm developing on Eclipse Juno Java EE for Web Developers.My app restarts when the orientation changes.I'm running the app on a Nexus 7 Android 4.2.2 and a Droid X Android 2.3.4. They both show the same behavior.Can anyone shed some light on what is going on?
On Monday, January 21, 2013 6:37:30 AM UTC-8, Alberto De Boni wrote:I've got a similar issue and googling for days lead me to nowhere.
I've added the lines said in this thread but the application still restar as soon as screen rotate.
First issue i've found is that screenSize is not allowed, looking at possible tags i've found screeLayout... but it doesn't work either.
I've got a page with authentication (index.html) that uses jQuery changePage to show main Application page on authentication success..
//console.log('Content'+content);
window.plugins.Base64ToString.convert(content, {},
function(result) {
decodedContent = result;
console.log('Decoded' + decodedContent);
if (decodedContent.length > 0) {
var x = $(decodedContent);
myUserSID = x.attr('user_sid');
console.log('UserSID' + myUserSID);
var store = window.sessionStorage.setItem("UserSID", myUserSID);
$.mobile.changePage('mainPage.html');
} else {
// TODO not logged alert.
}
;
}, function(error) {
alert(error);
});
},
on main page a screen rotation lead to go back to authentication page.
Here's the manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
package="wtnet.wtnet" android:versionName="1.1" android:versionCode="5" >
<supports-screens
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true"
/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.RECORD_VIDEO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<application android:icon="@drawable/icon" android:label="@string/app_name"
android:debuggable="true"
android:allowBackup="false">
<activity android:name="WTNET" android:label="@string/app_name" android:configChanges="orientation|screenLayout|keyboardHidden"
android:theme="@android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
--</application>
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17"/>
</manifest>
Any help?
On Wednesday, September 19, 2012 9:31:36 PM UTC+2, Fred Stluka wrote:Same typo here. Thanks!You'd think after using XML extensively for 12+ years, I would have avoided such a simple typo. Oops!BTW, it's worth noting that not only is it UNECESSARY to add screenSize when using API level less than 13, but also it is INCORRECT to add it in that case. Before API level 13, the screenSize value was not valid as part of android:configChanges, and causes this error at compile time:String types not allowed (at 'configChanges' with value 'orientation|keyboardHidden|keyboard|screenSize|locale').--Fred Stluka
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
For more info on PhoneGap or to download the code go to www.phonegap.com
---To compile in the cloud, check out build.phonegap.com
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.