*updated : Android to Flash server communication question

Is there any way to get data from desktop Flash running on windows to an Android target in NME ? Nightly ? Workaround ? Hail Mary play ?

Viewing 1 to 20 (28 Total)
*updated : Android to Flash server communication question

Franky

Franky
Total Posts: 98
Joined: February 26, 2012

Is there any way to get data from desktop Flash running on windows to an Android target in NME ?
Nightly ? Workaround ? Hail Mary play ?

Tags:
Posted on May 13, 2012 at 3:13 PM

Franky

Franky
Total Posts: 98
Joined: February 26, 2012

Re: *updated : Android to Flash server communication question

Well, guessing it isn't possible. Read that someone was using kryonet for communication between haxe on windows and android but can't find anything. Will have to probably go another path with this. Damn shame xmlsocket doesn't run on android target, but what can I do.
If anyone has some news on this or related please do share as I hit a wall over here over the socket thing.
Thank you.

Posted on May 15, 2012 at 9:16 AM

dh2

dh2
Total Posts: 6
Joined: May 15, 2012

Re: *updated : Android to Flash server communication question

I saw a while back something similar to this that made iPhone>desktop flash communications possible so Android>desktop must be possible too. It probably requires some hacking though. Can't recall the link but google might find it or I could check my bookmarks when I get back if that comes up blank for you.

Posted on May 15, 2012 at 12:19 PM

Franky

Franky
Total Posts: 98
Joined: February 26, 2012

Re: *updated : Android to Flash server communication question

Thanks for the info dh2. Looking for it now.
Much obliged if you get the chance to dig that one up from the bookmarks.

Posted on May 15, 2012 at 12:48 PM

dh2

dh2
Total Posts: 6
Joined: May 15, 2012

Re: *updated : Android to Flash server communication question

Hi, the link I was thinking of is:http://nuigroup.com/forums/viewthread/7364/... didn't realise it was 3 years ago but it has some info/code and a video with a mobile sending TUIO data to the desktop.
For NME Android it should be possible to write a java extension that uses DatagramSocket to connect via wifi to say your local machine and send UDP data that can be received by for example a little java app on your desktop then maybe on to where it is needed if that is possible. Not sure what the performance would be but in principle that should work.

Posted on May 15, 2012 at 3:16 PM

Franky

Franky
Total Posts: 98
Joined: February 26, 2012

Re: *updated : Android to Flash server communication question

Damn shame that a java extension is way over my head, but I will read up on it now that you mention it.
I am coming to the conclusion that this will have to be done with a flash on desktop windows server playing the video and casting playhead information based on embeded metadata (probably updating each second so not to get too heavy) and a swf running on twenty android browsers that synch the language-of-choice-audio to the video.
Probably with xmlsockets. Wish me luck.
Thanks for diggin that up dh2.

Posted on May 15, 2012 at 3:26 PM

singmajesty

singmajesty
Total Posts: 2192
Joined: August 25, 2011

Re: *updated : Android to Flash server communication question

NME has an "nme.JNI" class which should allow you to call Java methods without writing an extension.

Posted on May 15, 2012 at 3:55 PM

Franky

Franky
Total Posts: 98
Joined: February 26, 2012

Re: *updated : Android to Flash server communication question

Thanks for pointing that out, though I was aware of JNI.
But that it is one more thing to add to the "way over my head" list.

Posted on May 15, 2012 at 4:41 PM

dh2

dh2
Total Posts: 6
Joined: May 15, 2012

Re: *updated : Android to Flash server communication question

@singmajesty - I was thinking of something like this:http://www.joshuagranick.com/blog/2012/03/20/how-to-create-an-nme-e... you mean something different to that?
@Franky - That sounds like a plan. Probably lots of ways to do it. If you find one that gives good enough performance let us know. I might need something like that too. Good luck.

Posted on May 15, 2012 at 7:14 PM

RealyUniqueName

RealyUniqueName
Total Posts: 186
Joined: February 23, 2012

Re: *updated : Android to Flash server communication question

Does cpp.Socket work on mobile targets?

Posted on May 16, 2012 at 1:33 AM

Franky

Franky
Total Posts: 98
Joined: February 26, 2012

Re: *updated : Android to Flash server communication question

@ RealyUniqueName

Thank you very much for mentioning that.


@ singmajesty

... I just tried var soc = new Socket() and compiled to Android and got no "you can't access ... with current compilation flag" error.
So does this work on mobile and what would this connect to in flash... xmlsocket ?
Would I need a neko server to connect to in the backend and sync the flash video player and the android devices?
Or is this just compiling but will not work on mobile at all ? Just asking this because the api states sys.net.Socket is cpp only.

@ dh2

Will do. Still trying to figure the best way to go about this.

Posted on May 16, 2012 at 3:51 AM

RealyUniqueName

RealyUniqueName
Total Posts: 186
Joined: February 23, 2012

Re: *updated : Android to Flash server communication question

I think sys.net.Socket should work because as far as i know nme compiles through cpp for android/iOS.

As for XMLSocket, it is an ordinary socket but limited to string messages only.

Posted on May 16, 2012 at 4:07 AM

Franky

Franky
Total Posts: 98
Joined: February 26, 2012

Re: *updated : Android to Flash server communication question

So sys.net.Host wont work for a flash compile target, I got to find what I can connect to on that end that allows a server that permits communication with sys.net.Socket... great stuff RealyUniqueName. I am guessing a remoting context will probably not work.

edit: and just as I headed off to look at the haxe remoting page, the site is down... lol, the torture.

Posted on May 16, 2012 at 4:37 AM

RealyUniqueName

RealyUniqueName
Total Posts: 186
Joined: February 23, 2012

Re: *updated : Android to Flash server communication question

You can make android act as server

Posted on May 16, 2012 at 4:44 AM

Franky

Franky
Total Posts: 98
Joined: February 26, 2012

Re: *updated : Android to Flash server communication question

I want to connect 20 personal media players (android pmp's) loaded up with 4 (or more) selectable language audio files that should sync at any given moment to a machine playing out an .flv video file. This to allow for 20 people to watch the same video with correct language audio track per person on headphones.
That is why I was going with the windows machine acting as a server, playing the video in flash and sending out sync playhead information as a server. Probably a nice tucked away nettop connected to a wifi router.

I could try the android server with a tablet playing the video through hdmi out. Out of pure ignorance I don't know if I can pull 20 ip's to a tablet acting as a server.
Thanks for mentioning that, I got to look into that now.

haxe.org still down, lmao. It's like spikes now, pure torture.

Posted on May 16, 2012 at 5:06 AM

RealyUniqueName

RealyUniqueName
Total Posts: 186
Joined: February 23, 2012

Re: *updated : Android to Flash server communication question

You can create socket server as dedicated program on your desktop machine wich will sync android devices and flash player. Thereby flash and androids will act as clients.

Posted on May 16, 2012 at 5:30 AM

Franky

Franky
Total Posts: 98
Joined: February 26, 2012

Re: *updated : Android to Flash server communication question

Also, these:

http://groups.google.com/forum/#!msg/haxelang/fErxHX-1fqc/pBuNRbkum...

"If you try to use a Socket with Haxe 2.09, there's a compile error in C++:"

http://code.google.com/p/haxe/issues/detail?id=744...

"I cannot compile sys.net.Socket for Windows (C++)."

But everything ok is the target is Neko or Android... can anyone confirm this please, before I go out and buy an android tablet. grin

Posted on May 16, 2012 at 5:32 AM

Franky

Franky
Total Posts: 98
Joined: February 26, 2012

Re: *updated : Android to Flash server communication question

@RealyUniqueName

Neko server in the backend right ?
I will probably have to pad the sync info afterwards but that was one of the options I was contemplating.
Going to give it a whirl before jumping on the android tab server thing.
Thanks for showing me the options.

Posted on May 16, 2012 at 5:34 AM

RealyUniqueName

RealyUniqueName
Total Posts: 186
Joined: February 23, 2012

Re: *updated : Android to Flash server communication question

I think, Neko server is much cheaper than andoid tablet 8)
Also local network delays are so small, that you can count them instant. And if you use the same machine for flash player and for server, these delays are even less. So you don't need to pad anything if I got you wright )

Posted on May 16, 2012 at 6:18 AM

Franky

Franky
Total Posts: 98
Joined: February 26, 2012

Re: *updated : Android to Flash server communication question

For sure. grin

Posted on May 16, 2012 at 6:21 AM
« Previous12Next »