samsung mobile - check spen hardware feature availability in android programmatically -
i developing app lists hardware features wifi, bluetooth,nfc etc...
i using packagemanager.hassystemfeature()
check.
similarly there anyway check whether android device has spen hardware support or not?
need check progrmmatically.
i'm pretty sure covered in developer guide http://developer.samsung.com/:
boolean isspenfeatureenabled = false; spen spenpackage = new spen(); try { spenpackage.initialize(this); isspenfeatureenabled = spenpackage.isfeatureenabled(spen.device_pen); } catch (ssdkunsupportedexception e) { toast.maketext(this, "this device not support spen.", toast.length_short).show(); e.printstacktrace(); finish(); } catch (exception e1) { toast.maketext(this, "cannot initialize pen.", toast.length_short).show(); e1.printstacktrace(); finish(); }
Comments
Post a Comment