Hi
i need your help , i have a project where and android box tv (android 6) is connected through a usb-rs485 interface ( cp2104) with an energy monitor ,like this : (but without raspberry plus android tv box)
Every thing works well but my problem is that even though i have added the device into the device_filter.xml file , it asks me the permission to use it .
at the comand :
the answare is :
USBDeviceNr. 0 --- UsbPid = 60000 vendor 4292
the device_filter.xml is (there are even other 2 usb devices connected):
the manifest file is :
i can't understand .
The project is attached
i need your help , i have a project where and android box tv (android 6) is connected through a usb-rs485 interface ( cp2104) with an energy monitor ,like this : (but without raspberry plus android tv box)
Every thing works well but my problem is that even though i have added the device into the device_filter.xml file , it asks me the permission to use it .
at the comand :
B4X:
Log("USBDeviceNr. " & z & " --- UsbPid = " & manager.GetDevices(z).ProductId & " vendor " & manager.GetDevices(z).VendorId )
the answare is :
USBDeviceNr. 0 --- UsbPid = 60000 vendor 4292
the device_filter.xml is (there are even other 2 usb devices connected):
B4X:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<usb-device vendor-id="1921" product-id="21891"/>
<usb-device vendor-id="3468" product-id="316"/>
<usb-device vendor-id="4292" product-id="60000"/>
</resources>
the manifest file is :
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
AddApplicationText(
<activity android:name="main" >
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" android:resource="@xml/device_filter" />
</activity>
)
AddReceiverText(USBService,
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
</intent-filter>
)
'End of default text.
i can't understand .
The project is attached