lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 04/30/2012 07:40 AM, Satheesh Kumar wrote:
I am using Lua to develop a mobile appication.
Is there any function ( in lua sockets or other) to determine the speed of the device's internet connection?

Or should I just download a file and calculate (bytes/time)

I need to detect if the device's internet is 2G or not..

--
Regards,
Satheesh


I have not used Lua on mobile devices.
but at at least on Android devices, I know there is APIs to detect the connection type.
see the documentation below:
http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkType() <http://developer.android.com/reference/android/telephony/TelephonyManager.html#getNetworkType%28%29>

I believe there must be some way to retrieve this same info in Lua.