JParks
JParks

Reputation: 179

send UDP packets over LTE from Android

I cannot figure out how to send a UDP packet over a 4G LTE network from an Android app (no WiFi). Does anyone have any ideas or know where I can find some documentation? I need to write two android apps, one client and one server, so that I can send UDP packets with timestamps from one device to the other. This is to test 4G LTE network latency from device to device.

Please help!

Thanks!

Upvotes: 1

Views: 2105

Answers (2)

Jeff
Jeff

Reputation: 677

There are many existing Android Iperf apps that can be used for exactly what you are trying to do. I use Magic Iperf to do this type of testing myself.

Upvotes: 1

Mick
Mick

Reputation: 25491

You can use the DatagramSocket class:

This should work regardless of WiFi or mobile connection type, although you may find some mobile operators have some restrictions on UDP connections.

Upvotes: 2

Related Questions