1

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 :-)

Richard Erickson
  • 2,568
  • 8
  • 26
  • 39
UserK
  • 11
  • 1
  • In your AIR application.xml, there should be a node called `android` with a child node called `manifestAdditions`. Can you try adding the intent-filters and metadata there? – Marcela Jul 28 '15 at 15:05

0 Answers0