Home > Mobile >  Help android simulator network problems
Help android simulator network problems

Time:04-17

I set up a RabbitMQ on host service, IP is 10.10.21.25, for example, then the android studio built-in simulator using app as a client, to host the RabbitMQ ip10.10.21.25 service sends the message, the host can be successfully received messages, network should be unobstructed,

But on the app use the ping command to test host ip10.10.21.25 is failure, why is this?
How in the simulator app pings host IP?

 
String address="10.10.21.25";
Process Process=Runtime. GetRuntime (). The exec (" ping - 4 - c w 1000 + "address).
Int exit_value=(https://bbs.csdn.net/topics/process.waitFor);
If (exit_value=0) https://bbs.csdn.net/topics/={
System. The out. Println (" and "+ address +" connection. ");
} else {
System. The out. Println (" and "+ address +" connection is not clear. ");
}


The code above result is connected not unobstructed,
  • Related