开发者

Identifying unoficial Android devices

I might not like it, but the number of unofficial Android devices is growing and most of them have custom modifications to the Android OS or do not comply with the Android Compatibility Definition Document.

F开发者_如何学Cor example, the aPad/iRobot has made changes to the way the system handles screen rotations and the Eken has a virtual Menu button that disappears when the app executes on full-screen mode.

Apps that want to be compatible with these devices might need to deal with them on a case-by-case basis, using the Build class to identify them.

Unfortunately I don't have access to these devices and I don't know how to identify them. Does anybody have a list of Build values for unofficial Android devices, or alternatively is there a way to know if the device is an official Android device (querying for the Market app, perhaps)?


I'd say that if they don't comply with the Compatibility Definition Document, then that's their problem. You shouldn't have to worry about devices that don't conform to the Android standard, just like if a computer manufacturer made a computer that didn't have a keyboard, it isn't your job to work around the differences in hardware.


I created an app called Bug Reporter that sends all the Build values via email. If I get a report like this, I kindly ask the user to run it and I can use that to properly identify the device.


I found this on an Android blog:

import Android.Provider.Settings.System; 
String Android_ID = System.getString
    (this.getContentResolver(), System.ANDROID_ID); 

I'm not sure how helpful this is, although your application could record this ID and report it.

Here's another option, from the same Android blog.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜