开发者

Confused with android.hardware.touchscreen

I'm going to support Android devices not equipped with touch screens putting in manifest

<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>

But sti开发者_如何学JAVAll I do have some doubts. E.g. essential part of my application UI is built upon context menus, which appears on long tap of EditText and ImageView widgets.

I just wonder if device is lacking touch screen how operates context menu functionality? Can someone tell me?


According to latest Android Compatibility Definition Document (CDD) each android device must have touchscreen input. But this requirement was introduced much earlier, I've been able to track it up to Android 1.6. I haven't been able to track Android 1.5 CDD, but I can't recall any Android 1.5 phone without touchscreen support either.

So you can just ignore the devices without touchscreen support for now. They are non-existent in Android Market. And <uses-feature> is only useful for market, Android system does not check for matching feature support on the device before installing an application.


Android Compatibility: http://source.android.com/compatibility/
Android 1.6 CDD (see section 8.5): http://source.android.com/compatibility/1.6/android-1.6-cdd.pdf
Android 2.1 CDD (see section 8): http://source.android.com/compatibility/2.1/android-2.1-cdd.pdf
Latest Android CDD: http://source.android.com/compatibility/2.3/android-2.3.3-cdd.pdf


From Android 2.3 CDD:

7.2.4. Touchscreen input
Device implementations:
• MUST have a touchscreen
• MAY have either capacitive or resistive touchscreen
• MUST report the value of android.content.res.Configuration reflecting corresponding to the type of the specific touchscreen on the device
• SHOULD support fully independently tracked pointers, if the touchscreen supports multiple pointers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜