I have made a native Android app with Eclipse
which controls a RFID USB scanner.
These permissions are requested through the AndroidManifest.xml
in the intent-filter
and xml device filter
tag. When I plug the usb device in the Android (minix
), the permissions are given once and the scanner works perfectly.
Example of the manifest (in the native Android app):
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Main1Activity"
android:label="@string/title_activity_main1"
android:launchMode="singleTask"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
<action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_DETACHED"
android:resource="@xml/device_filter" />
</activity>
</application>
The problem is when I build the ANE
and use this in an AIR Android
app, these USB permissions are not requested and I don't have access to the device.
What should I place in the AIR Android manifest to access the USB device? I cannot use the intent-filters and meta-data because I don't have access to the XML.
Thanks for your help :-)