ESCPOS-ThermalPrinter-Android icon indicating copy to clipboard operation
ESCPOS-ThermalPrinter-Android copied to clipboard

USB can be disabled ?

Open mcapello opened this issue 6 years ago • 6 comments

Hi, one question again. Is it possible that you have this inside the library ?

<uses-feature android:name="android.hardware.usb.host" />

Because this significantly reduce the number of devices supported. Is there a way to dasactive this feature?

thanks

mcapello avatar Jun 24 '20 23:06 mcapello

What's happens when this library is used on devices that aren't USB compatible ? It's crash ?

DantSu avatar Jun 25 '20 06:06 DantSu

Right now, you can not used in devices not USB compatibles because you use: <uses-feature android:name="android.hardware.usb.host" /> and google chek for this in play store. That is why this library reduce the number of devices that an APP could be installed.

Maybe if you update to: <uses-feature android:name="android.hardware.usb.host" android:required="false"/> the APPs can be installed on non USB compatible devices.

Then in your library you can use this to control if USB is in te device: PackageManager.hasSystemFeature()

mcapello avatar Jun 25 '20 12:06 mcapello

Thx for the feedback, I will try some test.

DantSu avatar Jun 25 '20 12:06 DantSu

grate, thx you

mcapello avatar Jun 25 '20 12:06 mcapello

I re open this to know if you test this.

mcapello avatar Jun 25 '20 12:06 mcapello

v2.0.2 solve this problem.

Now USB permission have to be defined in application manifest and it's no more in library manifest.

DantSu avatar Jun 25 '20 12:06 DantSu