Closed t-m-z closed 2 years ago
Have you tried running ping -O -n -W 2 -i 1 -t 255 -c 3 sdklmfoqdd5qrtha.myfritz.net
in a terminal emulator on your device?
No - I only used the emulator from Android Studio
That's fine too. Just install a terminal emulator app on the android studio emulator and try running it that way to verify that the android studio emulator can actually ping the device regardless of dart_ping/flutter/dart libraries/frameworks, etc. Just testing the connection
No, that's not fine. I've tried the command on cmd and got badOption.
And according to Options that are available. There are some mistake on dart_ping command.
Even if I use to ping on google It's got a bad option.
I tried to change the commend based on Options that are available, and its work.
Are you sure that dart_ping did not run the wrong command?
Ohh sorry my bad, I run it on windows cmd not Linux terminal.
Yeah, you need to run it in the Android emulator. In a terminal emulator. Every platform has slightly different options because they use different versions or builds or implementations of the ping binary. The only real test is to run the same command it outputs on the exact same device/OS that you are running the app on
Closing due to inactivity. Feel free to reopen if you still need this and have tested in an android terminal emulator
I want to check via an Android app if my server is alive before sending an http-POST-Request. My code is
print(ping.command) shows ping -O -n -W 2 -i 1 -t 255 -c 3 sdklmfoqdd5qrtha.myfritz.net.
The results are PingError(response:PingResponse(seq:1), error:RequestTimedOut), PingError(response:PingResponse(seq:2), error:RequestTimedOut), PingSummary(transmitted:3, received:0), time: 2046 ms, Errors: [RequestTimedOut, RequestTimedOut, NoReply]
However, the server is alive.