12-16-2010 12:01 AM
I'm attempting to write an app that needs to discover certain type of UPnP devices on a LAN. This requires sending/receiving UDP packets. I was looking at flash.net.DatagramSocket, but then I realized that it was not supported on the Tablet OS simulator.
Any tips on how I can accomplish this?
12-16-2010 01:06 AM
I assume you say it's not supported because you checked DatagramSocket.isSupported in a running app. Is it possible that it could actually work even though that's set false?
I believe a new release of the SDK is due out any day now. I'd first wait and see what's new in it, then possibly start considering whether you can wait for the native SDK which I would think will support UDP. (For kicks, I tried sending a UDP packet using Python on the simulator and it worked fine. It wouldn't take much to hook an AIR app up to a Python app via the QNX PPS service, but currently that's a wholly unsupported sequence of things to do.)
12-16-2010 10:10 AM
Thanks. Yes, I checked DatagramSocket.isSupported (after it didn't appear to work). I'll give it another shot, but it doesn't seem very promising.
Good to know that you were able to get it to work with the Python work around. I might consider that in the meantime.
12-16-2010 10:45 AM - edited 12-16-2010 10:46 AM
you most likely will not be able to use the DatagramSocket class until the next release of the an update for the AIR Mobile SDK by adobe. The class is not support in the mobile platforms yet and seems to only be available on desktops. Here's an insert from the ASDocs:
"AIR profile support: This feature is supported on all desktop operating systems, but is not supported on mobile devices or AIR for TV devices. You can test for support at run time using the DatagramSocket.isSupported property. See AIR Profile Support for more information regarding API support across multiple profiles."
So for now you are going to have to use a workaround such as the one peter has provided. good luck!
12-16-2010 10:57 AM
I created an issue flash.net.DatagramSocket not supported to cover this issue.
Also, unless there is a response there to the effect that it will be supported but not quite yet, I wouldn't bother attempting a workaround (and certainly not one using Python and other internal features), since that would very likely result in the app being rejected. Also probably not working on the production tablet.
02-05-2011 05:35 PM
02-05-2011 05:40 PM
I can still see it, apparently. It's listed as in Triage, but no other change in status yet. I believe I got the email about two weeks ago indicating the change in status, not too long after they started looking into the tickets in earnest.
02-21-2011 10:17 PM - edited 02-21-2011 11:09 PM
I can't seem to see the case either. Any change in it? I could really use some UDP support right about now.
I just need to send one measly little udp packet and get a response. Can i get some info on the work around for this?
perhaps an example?
thank you very much.
edit: @peter9477, i looked through your site and i think you avoided posting it because of "section 12". i think i may have to scrap my whole application until that UDP functionality becomes a possibility.
02-22-2011 11:20 AM
No update on that ticket yet... still in "triage".
As for the workaround, I wasn't the one who called it that, and I tried to imply it wasn't really an option.
You can't call external code from an AIR app or Web app, so there's simply no way to use Python in that fashion except in some really roundabout way that would work only on the simulator, and only for apps that are marked "devmode"... basically it's an entirely unavailable option for now.
Sorry, but you very likely do have to put the app on hold for now, at least until the native SDK is released or described better. We may learn more on that in a couple of weeks.