• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Air Android ANE - USB manifest

New Here ,
Jul 28, 2015 Jul 28, 2015

Copy link to clipboard

Copied

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 🙂

TOPICS
Development

Views

452

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines