无法使用我的 Nexus S 连接到远程数据库
我一直在尝试将 Nexus S 连接到远程数据库(在我的本地计算机中设置)。
在本地计算机中,我已经设置了一个 MYSQL 数据库,并且我正在使用从 Android 应用程序激活的 php 访问它。
当我从模拟器测试它并使用 HTTP post 方法连接到其他本地计算机(设置服务器的位置)时,我的程序工作正常。
所以我发现当我尝试使用 Nexus S 连接到它时存在一些连接问题。
有人告诉我在连接到本地计算机时使用本地计算机的外部 IP 或静态 IP,但我无法弄清楚。
这是我在尝试连接并出现超时异常时收到的日志。
D/dalvikvm( 368): GC_EXPLICIT freed 4K, 51% free 3362K/6727K, external 1625K/2137K, paused 58ms
I/TelephonyRegistry( 107): notifyServiceState: 0 home Vodafone Vodafone 40445 (manual) UMTS CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false
I/TelephonyRegistry( 107): notifyDataConnection: state=2 isDataConnectivityPossible=true reason=null interfaceName=rmnet0 networkType=3
I/TelephonyRegistry( 107): notifyServiceState: 0 home Vodafone Vodafone 40445 (manual) HSDPA CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false
I/TelephonyRegistry( 107): notifyDataConnection: state=2 isDataConnectivityPossible=true reason=null interfaceName=rmnet0 networkType=8
I/TelephonyRegistry( 107): notifyServiceState: 0 home Vodafone Vodafone 40445 (manual) UMTS CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false
I/TelephonyRegistry( 107): notifyDataConnection: state=2 isDataConnectivityPossible=true reason=null interfaceName=rmnet0 networkType=3
I/TelephonyRegistry( 107): notifyServiceState: 0 home Vodafone Vodafone 40445 (manual) HSDPA CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false
I/TelephonyRegistry( 107): notifyDataConnection: state=2 isDataConnectivityPossible=true reason=null interfaceName=rmnet0 networkType=8
如果有人能给我一些意见
I have been trying to connect my Nexus S to a remote database (which is set up in my local computer).
In the local computer I have set up a MYSQL database and I am accessing it using php which I am activating from my android application.
My program is working fine when I am testing it from the emulator and connecting to the other local machine(where the server is set up) using HTTP post method.
So I have figured out there is some connectivity issue when I am trying to connect to it using my Nexus S.
Someone told about using the external IP or static IP for the local computer while connecting to the local computer, which I am not able to figure it out.
This is the log I'm getting when trying to connect and getting a Timeout exception.
D/dalvikvm( 368): GC_EXPLICIT freed 4K, 51% free 3362K/6727K, external 1625K/2137K, paused 58ms
I/TelephonyRegistry( 107): notifyServiceState: 0 home Vodafone Vodafone 40445 (manual) UMTS CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false
I/TelephonyRegistry( 107): notifyDataConnection: state=2 isDataConnectivityPossible=true reason=null interfaceName=rmnet0 networkType=3
I/TelephonyRegistry( 107): notifyServiceState: 0 home Vodafone Vodafone 40445 (manual) HSDPA CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false
I/TelephonyRegistry( 107): notifyDataConnection: state=2 isDataConnectivityPossible=true reason=null interfaceName=rmnet0 networkType=8
I/TelephonyRegistry( 107): notifyServiceState: 0 home Vodafone Vodafone 40445 (manual) UMTS CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false
I/TelephonyRegistry( 107): notifyDataConnection: state=2 isDataConnectivityPossible=true reason=null interfaceName=rmnet0 networkType=3
I/TelephonyRegistry( 107): notifyServiceState: 0 home Vodafone Vodafone 40445 (manual) HSDPA CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false
I/TelephonyRegistry( 107): notifyDataConnection: state=2 isDataConnectivityPossible=true reason=null interfaceName=rmnet0 networkType=8
if anyone can give me some points on it
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我很确定日志本身没问题。我们正在开发一款流媒体应用程序,当歌曲从移动 3G 网络流式传输时,我们得到了相同的日志。
正如评论中其他人提到的,这些日志很可能与您的连接问题无关。
超时本身可能意味着您尝试访问的主机无法访问。
I'm pretty sure the logs itself are fine. We are developing a streaming app and we got the same logs while songs are streamed from the mobile 3G network.
As other mentioned in comments, it is most likely that the logs are not related to your connectivity problem.
The Timeout itself probably means that the host your trying to reach is not accessible.