确定 android 设备是否是三星边缘设备之一

Identify if the android device is one of the samsung edge devices

我有一个请求ui,我必须弄清楚我的 android 应用程序是 运行 在其中一个三星边缘设备上还是它的常规 [=13] =] phone。因此我的 ui 会更新。我所能收集到的只是设备名称中有一个子字符串边缘。有人可以建议我更好的方法吗?

对于三星设备的,请查看第 10 页中的 Samsung programming guide for Edge

initialize() initializes Look. You need to initialize the Look package before you can use it. If the device does not support Look, SsdkUnsupportedException exception is thrown.

If an SsdkUnsupportedException exception is thrown, check the exception message type using SsdkUnsupportedException.getType(). The following two types of exception messages are defined in the Slook class: VENDOR_NOT_SUPPORTED: The device is not a Samsung device. DEVICE_NOT_SUPPORTED: The device does not support the Look package.

所以你可以这样做:

Slook slook = new Slook(); 
try { 
    slook.initialize(this); // it is a edge 
} catch(SsdkUnsupportedException e) 
{ 
    // it is not an edge 
}