[英]Flex android development. Network concerned
我正在开发一个flex android程序。 在此应用程序中,我使用AMF通道与服务器连接。 该应用程序在wifi连接中效果很好。 但是,当我断开与WIFI的连接并尝试在GPRS中运行我的应用程序时,一个奇怪的盒子让我震惊。 这是我关于堆栈溢出的第一个问题,因此也许我无法使用图片来描述对话框。 这是一个带有奇怪边框的对话框。 我的手机屏幕无法显示整个对话框。 文本输入框后有一个文本输入框(默认输入为“ 192.168.1.187”)和两个按钮(一个名为OK,另一个取消)。 在对话框的底部,还有一个名为“关闭”的按钮。
在无WiFi环境中运行应用程序时,渠道的建立过程很慢。 几秒钟后,出现对话框。
我不知道对话框的来源。 我确定我永远不会在代码中定义这个难看的对话框。 并且我已经删除了与IP地址“ 192.168.1.187”相关的所有代码(这是我计算机的IP地址,我试图在LAN中测试我的代码)
登录我的应用程序后,对话框也会每隔几秒钟出现一次。 但是在wifi连接中什么也没发生。
static public function ConnectServer(url:String):void
{
channel = new AMFChannel("pyamf-channel",url);
channel.connectTimeout = 15;
channel.addEventListener(ChannelEvent.DISCONNECT,function(event:ChannelEvent):void{
event.preventDefault();
trace("Error1");
});
channel.addEventListener(ChannelFaultEvent.FAULT,function(event:ChannelFaultEvent):void{
//event.preventDefault();
trace("Error2");
});
channel.addEventListener(ChannelEvent.CONNECT,function(event:ChannelEvent):void{
trace("connect success");
if(channelSet != null)
{
remoteObject = new Remote_Object(channelSet,SystemParam.Remote_Service_Name);
SystemParam.Remote_Service = remoteObject;
trace("already go from here.");
}
});
trace("spring comes."+ channel.toString());
channelSet = new ChannelSet();
channelSet.addChannel(channel);
channel.connect(channelSet);
}
我不知道怎么了,现在该怎么办。
问题上周已解决。
我删除了我的项目,并从服务器中签出了它。 事情完成了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.