We are developing an app, what is changing the hard coded orientation portrait to landscape on the 2nd launch.
We have screenOrientation="portrait" in all activity definitions in the manifest file.
Any idea how to resolve this?
Here is my code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myproject"
android:installLocation="auto"
android:versionCode="13"
android:versionName="12.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:icon="#string/icon"
android:label="#string/app"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen" >
<meta-data
android:name="com.mobclix.APPLICATION_ID"
android:value="XXXX" />
<activity
android:name=".SplashActivity"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="portrait" />
<activity
android:name=".xyactivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="portrait" />
<activity
android:name=".xyzActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".abactivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.mobclix.android.sdk.MobclixBrowserActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
</application>
</manifest>
For restricting to only portrait orientation you need to put this code for every activity during declaration in your manifestfile
<activity android:name="MyApp" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden"></activity>
Related
I use existing project in Eclipse.
It is an Android application.
Eclipse shows no build error in the project.
I can Run it As Android Application on my Android device. No problems.
When I build apk file using Export - Export Android Appliction, copy apk file on Android device and try to run (Install) it ask for installing
when press Install it shows Installing... string for sometime
then show Application not installed.
How to understand the cause of the error?
Get more detailed information about why the program failed to install?
I have Eclipse 4.2.2
Project build target 4.0.3
Android version of the phone is 5.0.1
Here is AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.syclo.agentry.client.android"
android:installLocation="auto"
android:versionCode="70010000"
android:versionName="70.10.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="11" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<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_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<permission
android:name="com.syclo.agentry.client.android.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.syclo.agentry.client.android.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<permission-group
android:name="com.syclo.agentry.client.android.permission.group.AGENTRY"
android:description="#string/permission_group_agentry_description"
android:label="#string/permission_group_agentry_label" />
<permission
android:name="com.syclo.agentry.client.android.permission.AGENTRY_IPC"
android:description="#string/permission_ipc_description"
android:label="#string/permission_ipc_label"
android:permissionGroup="com.syclo.agentry.client.android.permission.group.AGENTRY"
android:protectionLevel="dangerous" />
<application
android:name=".AgentryAndroidClient"
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:logo="#drawable/logo"
android:theme="#style/AgentryDefault" >
<activity
android:name=".ui.builtin.StartupActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/app_name_short"
android:noHistory="true"
android:theme="#style/AgentryDefault.NoTitleBar.FullScreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.builtin.SplashActivity"
android:label="#string/app_name_short"
android:noHistory="true"
android:theme="#style/AgentryDefault.NoTitleBar.FullScreen" />
<activity
android:name=".ui.builtin.ServerSelectionActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/server_select"
android:theme="#style/AgentryDefault.ActionBar" />
<activity
android:name=".ui.builtin.LoginActivity"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleTask"
android:theme="#style/AgentryDefault.ActionBar"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".ui.builtin.LogoutDialogActivity"
android:excludeFromRecents="true"
android:label="#string/app_name_short"
android:noHistory="true"
android:theme="#android:style/Theme.Dialog" />
<activity
android:name=".ui.builtin.IdleTimeoutActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/welcome"
android:launchMode="singleTask"
android:theme="#style/AgentryDefault.ActionBar"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".ui.builtin.ModuleMenuActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/module_menu"
android:launchMode="singleTop"
android:theme="#style/AgentryDefault.ActionBar" />
<activity
android:name=".ui.builtin.AboutBoxActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="#style/AgentryDefault.NoTitleBar" />
<activity
android:name=".ui.builtin.PasswordChangeActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/passwd_change_title"
android:theme="#style/AgentryDefault.ActionBar"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".ui.builtin.TransmitActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/transmit_title"
android:theme="#style/AgentryDefault.ActionBar" />
<activity
android:name=".ui.screensets.TabbedScreenSetActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="#style/AgentryDefault.ActionBar"
android:uiOptions="splitActionBarWhenNarrow" />
<activity
android:name=".ui.screensets.WizardScreenSetActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="#style/AgentryDefault.ActionBar"
android:uiOptions="splitActionBarWhenNarrow" />
<activity
android:name=".ui.screensets.OverlayScreenSetActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="#style/AgentryActivityDialog" />
<activity
android:name=".ipc.IntentReceiver"
android:exported="true"
android:permission="com.syclo.agentry.client.android.permission.AGENTRY_IPC"
android:theme="#android:style/Theme.NoDisplay" />
<activity
android:name="com.google.zxing.client.android.CaptureActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="landscape"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden" >
</activity>
<activity
android:name="org.openintents.filemanager.FileManagerActivity"
android:configChanges="orientation"
android:label="#string/app_name" />
<receiver
android:name=".ui.builtin.GCMReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.syclo.agentry.client.android" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.syclo.agentry.client.android" />
</intent-filter>
</receiver>
<receiver android:name=".ui.builtin.TimeZoneChangeReceiver" >
<intent-filter>
<action android:name="android.intent.action.TIMEZONE_CHANGED" />
<category android:name="com.syclo.agentry.client.android" />
</intent-filter>
</receiver>
<activity
android:name=".ZNFC"
android:label="#string/title_activity_znfc" >
</activity>
</application>
</manifest>
Just goto -> Settings -> Applications -> findyourapp and Uninstall it, it will works/or installed after that.
My app doesn't support a specific android device (Samsung Galaxy Tab 3 10.1 P5210), though it supports other 10 inch tablets. I am clueless as to why this is happening. What could be the reason?
The client has the above mentioned tablet and my app doesn't get listed on his store.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app"
android:versionCode="8"
android:versionName="1.7" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<permission
android:name="com.example.app.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.app.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="com.android.vending.BILLING" />
<!-- Permissions for GCM -->
<permission
android:name="com.example.app.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.app.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#drawable/app_logo"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.Light" >
<uses-library android:name="com.google.android.maps" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="XYZ" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/app_id" />
<!-- Services and receivers for GCM -->
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.app" />
</intent-filter>
</receiver>
<receiver
android:name="com.example.app.FFHBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="zecross.ffh.broadcastReceiver" />
</intent-filter>
</receiver>
<receiver android:name="com.example.app.NetworkStateChangeListener" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<!-- <action android:name="android.net.wifi.WIFI_STATE_CHANGED" /> -->
</intent-filter>
</receiver>
<service android:name="com.example.app.GCMIntentService" />
<activity
android:name="com.example.app.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.app.SwipingTaskDetails_Activity"
android:label="#string/title_activity_task_details"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.PostTask"
android:label="#string/title_activity_task_posttask"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.facebook.LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" />
<activity
android:name="com.example.app.TasksForHire_Activity"
android:alwaysRetainTaskState="True"
android:label="#string/title_activity_tasks_for_hire"
android:screenOrientation="portrait" />
<activity
android:name="com.example.app.SideMenu"
android:label="#string/app_name"
android:noHistory="true"
android:screenOrientation="portrait"
android:theme="#style/TranslucentActionBar" />
<activity
android:name="com.example.app.MyTasks_Activity"
android:label="#string/title_activity_my_tasks"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.SingleTaskDetails_Activity"
android:label="#string/title_activity_task_details"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.Filter_Activity"
android:label="#string/title_activity_filter"
android:screenOrientation="portrait"
android:theme="#style/TranslucentActionBar"
android:windowSoftInputMode="adjustPan|stateHidden" >
</activity>
<activity
android:name="com.example.app.TasksForMe_Activity"
android:label="#string/title_activity_tasks_for_me"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.TaskDiscuss_Activity"
android:label="#string/title_activity_task_discuss"
android:screenOrientation="portrait" />
<activity
android:name="com.example.app.Errand"
android:label="#string/title_activity_task_errand"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.example.app.Sitter"
android:label="#string/title_activity_task_sitter"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.example.app.AdviceLessonsTutor"
android:label="#string/title_activity_task_tutor"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.example.app.Handyman"
android:label="#string/title_activity_task_handyman"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.example.app.Cleaning"
android:label="#string/title_activity_task_cleaning"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.example.app.VirtualTask"
android:label="#string/title_activity_task_virtual_task"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.example.app.AnythingGoes"
android:label="#string/title_activity_task_anything_goes"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.example.app.ItemsAndServicesForSale"
android:label="#string/title_activity_task_items_sale"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.example.app.MyTaskInteraction_Activity"
android:label="#string/title_activity_my_task_interaction"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.LocateVenueCE"
android:label="#string/title_activity_locate_venue"
android:noHistory="true"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.LocationFilter"
android:label="#string/title_activity_location_filter"
android:screenOrientation="portrait"
android:theme="#style/TranslucentActionBar"
android:windowSoftInputMode="adjustPan|stateHidden" >
</activity>
<activity
android:name="com.example.app.SocialActivity"
android:label="#string/title_activity_social"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" >
</activity>
<activity
android:name="com.example.app.ContactsList"
android:label="#string/title_activity_phone_contact_list"
android:noHistory="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" >
</activity>
<activity
android:name="com.example.app.Chat_Activity"
android:label="#string/title_activity_chat_activity"
android:noHistory="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" >
</activity>
<activity
android:name="com.example.app.UserFBProfile"
android:label="#string/title_activity_user_fbprofile"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.MyAccount"
android:label="#string/title_activity_my_account"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.NotificationSettings"
android:label="#string/title_activity_notification_settings"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.Preferences"
android:label="#string/title_activity_preferences"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.ActivityNotifications"
android:label="#string/title_activity_notifications"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.Notifications_Activity"
android:label="#string/title_activity_notifications"
android:noHistory="true"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.NoInternetActivity"
android:label="#string/title_activity_no_internet"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="#style/TranslucentActionBar" >
</activity>
<activity
android:name="com.example.app.InAppPurchases"
android:label="#string/title_activity_in_app_purchases"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.app.Blocked_Activity"
android:label="#string/title_activity_blocked"
android:screenOrientation="portrait" />
<activity
android:name="com.example.app.SendFeedback"
android:label="#string/title_activity_send_feedback"
android:screenOrientation="portrait" />
<activity
android:name="com.example.app.My_Ratings"
android:label="#string/title_activity_my_ratings"
android:screenOrientation="portrait" />
</application>
</manifest>
In your manifest you are specifying that your app requires openGL ES 2.0:
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
Hence it will run only on devices that do.
It's the only requirement besides the Android version, therefore I guess your Samsung Galaxy Tab 3 doesn't.
Besides, you might want to change your package name from com.example.app to something else.
The problem was with the Camera Permission. When I removed that permission, my client's tab began supporting the app. But I still find it strange since the tab had both front and rear camera.
Try adding back the camera permission as you need it and specify the allowed screen sizes on the manifest. I reccomend you to add this code under uses-permissions tag for example...
<supports-screens
android:anyDensity="true"
android:resizeable="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true"
android:largestWidthLimitDp="2560"
android:compatibleWidthLimitDp="2560" />
Hope it helps!
I made a copy of one of my working projects for another project. Ever since I can't get the AndroidManifest.xml to work properly. I get the error The element must be a direct child of the <application> element or The element type "manifest" must be terminated by the matching end-tag "</manifest>"error. I have refactored everything else and don't see any errors in my classes. Just the xml file is being a pain. What is wrong with this file? It looks fine and looks like my working one. Eclipse seems to think there are errors.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package= "com.mydomain.qsd"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="com.mydomain.qsd.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<permission
android:name="com.mydomain.qsd.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" />
<activity
android:name="com.mydomain.qsd.MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.mydomain.qsd.SplashScreen"
android:screenOrientation="portrait" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name="com.mydomain.qsd.gcm.GCMReceiver"
android:permission="com.google.android.c2dm.permission.SEND" />
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.mydomain.qsd" />
</intent-filter>
</receiver>
<service android:name="com.mydomain.qsd.gcm.GCMService"/>
<activity
android:name="com.mydomain.qsd.NotifyActivity"
android:screenOrientation="portrait"
android:label="#string/title_activity_notify" />
</activity>
</application>
</manifest>
You have directly close your application tag
Replace this :
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" />
by this :
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
EDIT :
You have to replace this :
<activity
android:name="com.mydomain.qsd.MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait"/>
by this :
<activity
android:name="com.mydomain.qsd.MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait" >
This :
<activity
android:name="com.mydomain.qsd.SplashScreen"
android:screenOrientation="portrait" />
by this :
<activity
android:name="com.mydomain.qsd.SplashScreen"
android:screenOrientation="portrait" >
This :
<receiver
android:name="com.mydomain.qsd.gcm.GCMReceiver"
android:permission="com.google.android.c2dm.permission.SEND" />
by this:
<receiver
android:name="com.mydomain.qsd.gcm.GCMReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
And finally this :
<activity
android:name="com.mydomain.qsd.NotifyActivity"
android:screenOrientation="portrait"
android:label="#string/title_activity_notify" />
</activity>
by this :
<activity
android:name="com.mydomain.qsd.NotifyActivity"
android:screenOrientation="portrait"
android:label="#string/title_activity_notify" />
Your application Tag and also Activity tags have self close so remove that
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" /> <----- remove /
I have the following manifest file for my app
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.netserv.Pungry"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:maxSdkVersion="17"
android:minSdkVersion="5" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<!-- <meta-data -->
<!-- android:name="ADMOB_ALLOW_LOCATION_FOR_ADS" -->
<!-- android:value="true" /> -->
<meta-data
android:name="ADMOB_PUBLISHER_ID"
android:value="a150cb2e31846cf" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="#drawable/bghomescreen"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.netserv.Pungry.Home"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LocationbyCities" >
</activity>
<activity android:name=".General" >
</activity>
<activity android:name=".RestaurantsList" >
</activity>
<activity android:name=".Quickbite" >
</activity>
<activity android:name=".AdvanceSearch" >
</activity>
<activity android:name=".SelectMenu" >
</activity>
<activity android:name=".RestaurantDetails" >
</activity>
<activity
android:name="com.google.ads.AdActivity"
android:configChanges="orientation|uiMode|keyboard|keyboardHidden|screenSize|smallestScreenSize|screenLayout" />
<receiver android:name=".UpdateReceiver" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
</application>
</manifest>
When I load the app to device it is working fine in portrait mode. But when i change from portrait to landscape mode it is transisting to some different activity which is not the correct one and some times the app itself will close.
I have defined layout's in layout for portrait and layout-land for landscape mode.
I don't want to fix the orientation to portrait mode.
Try overriding these two methods. It had solved my problem.
#Override
protected void onSaveInstanceState(Bundle outState) {
webView.saveState(outState);
super.onSaveInstanceState(outState);
}
#Override
protected void onRestoreInstanceState(Bundle inState) {
webView.restoreState(inState);
super.onRestoreInstanceState(inState);
}
Hope that helps.
Just use the configChange attribute in your all activities
<activity
android:name="com.netserv.Pungry.Home"
android:label="#string/app_name"
android:configChange="orientation|screenSize" > <!-- like this use this attribute in all activities -->
<?xml version="1.0" ?>
<manifest android:screenOrientation="landscape" android:versionCode="3"
android:versionName="3" package="com.tablet3" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="11" />
<!-- TI_MANIFEST -->
<application android:debuggable="false" android:icon="#drawable/appicon"
android:label="actiobar" android:name="actiobarApplication">
<!-- TI_APPLICATION -->a
<activity android:configChanges="keyboardHidden" android:screenOrientation="landscape"
android:label="mob" android:name=".actiobarActivity" android:theme="#style/Theme.Titanium">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:configChanges="keyboardHidden" android:name="org.appcelerator.titanium.TiActivity"
android:screenOrientation="landscape" />
<activity android:configChanges="keyboardHidden" android:name="org.appcelerator.titanium.TiTranslucentActivity"
android:screenOrientation="landscape" />
<activity android:configChanges="keyboardHidden" android:name="org.appcelerator.titanium.TiModalActivity"
android:screenOrientation="landscape" />
<activity android:configChanges="keyboardHidden" android:name="ti.modules.titanium.ui.TiTabActivity"
android:uiOptions="splitActionBarWhenNarrow" android:screenOrientation="landscape"
/>
<activity android:name="ti.modules.titanium.ui.android.TiPreferencesActivity"
android:screenOrientation="landscape" />
<service android:exported="false" android:name="org.appcelerator.titanium.analytics.TiAnalyticsService"
/>
</application>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
I get this error when i add uiOptions to my activity.
AndroidManifest.xml:22: error: No resource identifier found for attribute 'uiOptions' in package 'android'
I want the ActionBar to come down, so i am actually trying to uiOptions in my Activity.
This attribute was added in API 14, but you have specified targetSdkVersion 11