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

Popular posts from this blog

javascript - How to diff two immutable objects -

c# - How can I have the VS Debugger break in the correct location for exceptions thrown in Async methods in a Console App? -

javascript - React.js: onClick function from child to parent -