Thursday, October 06, 2011

Android Application Trouble with "android.hardware.screen.landscape"

The Problem:

When you upload your APK to the Android Market it is flagged with an awful and mysterious permisison called "android.hardware.screen.landscape" and this limits your devices to a very small number.


The Issue:

You have a landscape application that does not support portrait. However, your application will run on many devices that are rotated even if they do not specifically have the landscape hardware (ie, no portrait mode?)


The Solution:

Add the following line to your AndroidManifest.xml and everything will be fine.




Notes


At some point Google added this as a filter during upload. It came on and off for a while depending on what SDK you use. Various people have posted / Tweet'd that it can be fixed with an SDK upgrade. That may or may not be true on your platform or at the time you read this.

5 comments:

Anonymous said...

What line???

Eugene said...

I think this line:

Eugene said...

uses-feature android:name="android.hardware.screen.landscape"

Eugene said...

http://developer.android.com/guide/topics/manifest/uses-feature-element.html#hw-features

Eugene said...

And don't forget about
android:required="false"