开发者

How to send a UDP-Pagakge via Android and AIR 3

开发者 https://www.devze.com 2023-04-12 18:55 出处:网络
i tried to send a udp-package via the datagrasocket-class in adobe air 3! this worked fine as long as i test the app in flash-builder 4.5.

i tried to send a udp-package via the datagrasocket-class in adobe air 3!

this worked fine as long as i test the app in flash-builder 4.5.

unfortunately if i test my app on the phone i cant send any package or better i c开发者_开发技巧an't see the sent package on the target-pc. (wireshark)

Does somebody know what goes wrong there !?

thanks in advance!


Adobe Air has a new feature called native extensions that allows you to call classes from the device and utilize them. You could simply use the mobile device's native UDP socket capabilities and I've checked that both iOS and Android have UDP capabilities.


Well i stumbled over the solution!

it is not possible to use DatagramSocket on mobile devices!

see: AIR profiles

cu


An interesting new library has recently surfaced in this area. Uses Native extensions. Looks to support iOS and Android at this time. Promising!

http://blog.aboutme.be/2011/12/14/udp-native-extension-for-air-mobile-now-with-android-support/

0

精彩评论

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

关注公众号