Skip to main content
Participant
July 28, 2015
Question

Air Android ANE - USB manifest

  • July 28, 2015
  • 0 replies
  • 480 views

Hey,

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, so 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 so 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 🙂

This topic has been closed for replies.