-1

I have a requirement in which I have to figure out if my android app is running on one of the samsung edge devices or its a regular android phone. Accordingly my ui would update. All i could gather is that the device name has a substring edge in it. Can someone suggest me a a a better way to do this ?

Ashish Kumar
  • 374
  • 4
  • 11

1 Answers1

1

For samsung device's, take a look at the Samsung programming guide for Edge, in page 10 :

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.

So you can do this:

Slook slook = new Slook(); 
try { 
    slook.initialize(this); // it is a edge 
} catch(SsdkUnsupportedException e) 
{ 
    // it is not an edge 
}
E.Abdel
  • 1,992
  • 1
  • 13
  • 24