<uses-feature ... "android.hardware.faketouch"
I have a question:
An application that specifies -uses-feature ... "android.hardware.faketouch" android:required="true"
- in its Manifest file, will be also shown in the 开发者_JS百科Market how an application that can run in touchscreen devices? If you specify a requirement for android.hardware.faketouch
, then all genuine touch devices will still see the app listed.
faketouch
is a superset of touchscreen
, so anyone with a real touchscreen has implicit support for faketouch
, as they can perform all the actions supported by it.
However there is a minor quirk with the Market in that you need to override the implicit touchscreen entry and add required=false
to it. Failing to do this will mean that the market lists both touchscreen and faketouch as required, thus still not showing it to faketouch only devices.
Your manifest should therefore contain:
<uses-feature android:name="android.hardware.faketouch"/>
<uses-feature android:required="false" android:name="android.hardware.touchscreen"/>
This will allow your app to show for the full range of devices including faketouch only ones.
http://www.saschahlusiak.de/2012/10/android-hardware-faketouch-vs-android-hardware-touchscreen/
By default, an Android application requires the feature android.hardware.touchscreen, which is then used for filtering in Google Play, so only devices, that have touchscreen capabilities, will be able to install that app.
Besides that, there is a more basic feature, android.hardware.faketouch.
If the application does not require touchscreen features, it is recommended to set android.hardware.touchscreen to not be required, but declare android.hardware.faketouch instead.
<uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <uses-feature android:name="android.hardware.faketouch" android:required="true" />
If you do that, check the results on Google Play, which shows the number of supported devices:
- touchscreen required, faketouch not required: 1500
- touchscreen not required, faketouch required: 860
- neither required: 1800
精彩评论