Is there an API to use to determine if the device an app is running on happens to be one of the Samsung "Edge" devices? That is, a device with a rounded edge as opposed to the one with the right-angled edges. (I believe Samsung is the only one manufacturing these at the moment.)
Additionally, some of the older "Edge" devices had only one rounded edge, while the newer ones have two. Is it possible to differentiate between these cases: no rounded edges, one rounded edge, two rounded edges?
I've encounter this problem too, after reading at the SDK docs, inspect the jar, and a few try and error; This is the method I use to check Samsung Edge devices (i.e Samsung Galaxy S8/S9.) without adding SDK libraries.
Explanation:
This method try to find
SlookImplclass.If it found one, then we can query the COCKTAIL_PANEL availability.
Note: Before calling
isEdgeDevice()method, I will check if theBuild.MANUFACTURERandBuild.BRANDis "samsung", then I will proceed to check whether its edge device or not.