Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Basic problems using bluetooth ANE #9

Open
Francesco2712 opened this issue Sep 6, 2016 · 0 comments
Open

Basic problems using bluetooth ANE #9

Francesco2712 opened this issue Sep 6, 2016 · 0 comments

Comments

@Francesco2712
Copy link

Francesco2712 commented Sep 6, 2016

Good morning to everyone,
I'm developing a mobile application with bluetooth capabilities on flash builder 4.7 (Flex version 4.15.0 and AIR 20.0).

I've tried a very simple program to start with bluetooth ANE, but it doesn't work. The program is the following:

`
fx:Script
<![CDATA[
import com.myflashlab.air.extensions.bluetooth.Bluetooth;

        private var _ex:Bluetooth = new Bluetooth();

        if (_ex.isEnable) b_enabled.text = "YES";
        else b_enabled.text = "NO";
    ]]>
</fx:Script>

    <s:HGroup>
        <s:Label text="Bluetooth: " />
        <s:Label id="b_enabled" />
    </s:HGroup>`

The program get some errors, as follow:

Type was not found or was not a compile-time constant : Bluetooth.
Access of undefined property _ex.
Access of undefined property b_enabled.
Access of undefined property b_enabled.
Can not resolve a multi name reference unambiguously.

I can debug it on a phone, it starts but the label that should indicate the bluetooth status doesn't change (it never appear, bluetooth enabled or not).

I've included the SWC and ANE file following the adobe guide (Project->Properties->Flex Build Path). The ANE file has a red X on the left, but I read it is because it doesn't support Desktop application.

I've included in the manifest the following lines:

`
<![CDATA[


            <!--Required for Bluetooth to work properly from Android 6.0 or higher. More info here: 
            http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id-->

            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
            <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

            <application>
                <activity android:name="com.doitflash.blutooth.EnableActivity" android:label="title_activity_main" />
            </application>

        </manifest>

    ]]></manifestAdditions>
</android>

<extensions>
<extensionID>com.myflashlab.air.extensions.bluetooth</extensionID>

`

Have you some advise for my problem?
Any help is very appreciated.

Francesco

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant