Can you tell if a cellular network is available on Android?

I have created an application that can send a text message with a click of a button, but the weird problem is that when there is no coverage, the force of the application is closed or sent without information. so I would like to check if there is a cellular connection, if I agree with sending SMS or try again!

Is it possible?

Thank!

+3


source to share


1 answer


If you mean by "no coverage", no connection, you can check this: http://developer.android.com/reference/android/net/ConnectivityManager.html#EXTRA_EXTRA_INFO

Check: EXTRA_NO_CONNECTIVITY



If you are talking about signal strength then ... you can also use this as a reference:

http://developer.android.com/reference/android/telephony/SignalStrength.html

+2


source







All Articles