Skip to main content
March 17, 2011
Question

Android with FMS

  • March 17, 2011
  • 1 reply
  • 1314 views

Hi,

Have anyone tried accessing the FMS installed in their comp with their Android device?If both my PC and Android devices are connected to the same wifi,the coding below should do the work right?or am I missing something?I ran it on the pc and it works normally,but when i port it to the Android device,it won't connect to the FMS on my PC.

nc = new NetConnection();

nc.connect("rtmp://my ip address/vod");

nc.addEventListener(NetStatusEvent.NET_STATUS,onNetStatus);

private function onNetStatus(event:NetStatusEvent):void{

trace(event.info.code);

switch(event.info.code){

case "NetConnection.Connect.Success":

ns = new NetStream(nc);

ns.play("sample");

vid.attachNetStream(ns);

ns.client = customClient;

customClient.onMetaData = metaDataHandler;

ns.addEventListener(NetStatusEvent.NET_STATUS, statusHandler);

break;

}

}

Please advice,thanks!

Regards,

Tan

    This topic has been closed for replies.

    1 reply

    March 17, 2011

    I have no problems connection to FMS apps using FP10.1 on Android.

    The only issue I see in the code is that customClient isn't defined anywhere, but maybe that's elsewhere in your code that you haven't posted

    March 17, 2011

    The custom client is responsible for the connection between the Android and the FMS in my PC?I didn't define it in my script.How do I actually define the custom client to allow the Android the access the FMS in my PC?Sorry,I am still very new in this and i am still trying to debug it.Please advice,thanks!

    Regards,

    Tan

    March 17, 2011

    Lets back up here for a second. Are you saying that you're taking your actionscript code and trying to dump it into a java based Android application, or are you running the compiled .swf in flashplayer on android?