开发者

Implementing native android code with AIR code

After following these instructions to integrate Adobe AIR with native Android I have a few issues.

I have managed to get a bluetooth connection going in native android, setting up 2 BluetoothSockets which then shows the air app also packaged within the apk. This included air app requires 2 connections to somewhere (normally wifi).

I have it connecting to TestService1 and TestService2, which is then passing the traffic between these services and the BluetoothSockets.

It is a little slow as i have to put开发者_JS百科 Thread.sleep(80) in between reading from bt socket and writing to the AIR app for it to work currently.

My 2 questions are

Is there any way to get the AIR app to know about and access the Bluetooth Sockets created in the Android code rather than having the 2 Services being the middle men?

Is this kind of release (hybrid) allowed in Android Marketplace does anyone know?

Really hoping to find an answer to question 1 as currently my bluetooth server is continously sending data and using the TestService1 and 2 to get this bluetooth data to the AIR app and is causing a 10 seconds lag.

Thanks in advance


These apps are definitely allowed in the Android market.

You should be able to send Bluetooth data immediately over the socket to the AIR app. It doesn't seem like you should need 2 separate services or a sleep. I think your service that is talking to the Bluetooth can also listen on a socket and send data over that socket when it gets it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜