识别非官方 Android 设备

发布于 2024-09-07 08:20:32 字数 545 浏览 3 评论 0 原文

我可能不喜欢它,但非官方 Android 设备的数量正在增长,其中大多数对 Android 操作系统进行了自定义修改,或者不符合 Android 兼容性定义文档

例如,aPad/iRobot 更改了系统处理屏幕旋转的方式,而 Eken 有一个虚拟菜单按钮,当应用程序在全屏模式下执行时,该按钮会消失。

想要与这些设备兼容的应用程序可能需要根据具体情况进行处理,使用 构建类来识别它们。

不幸的是,我无权访问这些设备,也不知道如何识别它们。有没有人有非官方 Android 设备的 Build 值列表,或者有没有办法知道该设备是否是官方 Android 设备(也许可以查询 Market 应用程序)?

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.

For 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)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

怎言笑 2024-09-14 08:20:32

我想说,如果他们不遵守兼容性定义文档,那就是他们的问题。您不必担心不符合 Android 标准的设备,就像计算机制造商制造的计算机没有键盘一样,解决硬件差异并不是您的工作。

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.

手心的温暖 2024-09-14 08:20:32

我创建了一个名为 Bug Reporter 的应用程序,它通过电子邮件发送所有构建值。如果我收到这样的报告,我会请用户运行它,我可以使用它来正确识别设备。

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.

杀お生予夺 2024-09-14 08:20:32

我在 Android 博客 上找到了这个:

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

我不确定这有多大帮助,尽管您的应用程序可以记录此 ID 并报告它。

这是另一个选项,来自同一个 Android 博客

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文