MobileChromeApps / cordova-plugin-chrome-apps-usb

BSD 3-Clause "New" or "Revised" License
13 stars 13 forks source link

USB Host detection #4

Open fcorneli opened 8 years ago

fcorneli commented 8 years ago

Via: http://developer.android.com/reference/android/content/pm/PackageManager.html#hasSystemFeature%28java.lang.String%29 we can detected whether an Android device supports USB Host mode: http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_USB_HOST

We could extend the cordova-plugin-chrome-apps-usb Cordova plugin with an API for this. For example:

chrome.usb.cordova.hasUsbHostFeature(function (result) {
    console.log("USB Host supported: " + result);
});
agrieve commented 8 years ago

sounds good to me!

fcorneli commented 8 years ago

@agrieve before or after a 1.1.1?

fcorneli commented 8 years ago

@agrieve I've tried to do a PR between my unregisterReceiverFix branch and my issue4 branch. But then the PR ends up at my repository instead of @ MobileChromeApps. See: https://github.com/e-Contract/cordova-plugin-chrome-apps-usb/pull/1