I have sales application.This application used by sales rep. So We can't make sure anywhere wifi or 3G available. So I have to check the GPRS connection. & Sales rep need to do the replication.If the GPRS strength is higher than particular rate then allow to do the replication.
How to find out GPRS is enable ? I want to call webservice.First It check WIFI,3G,then GPRS.
For WIFI, 3G I did like this
ConnectivityManager manager = (ConnectivityManager) getSystemService(DownlaodTableActivity.CONNECTIVITY_SERVICE);
Boolean is3g = manager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).isConnectedOrConnecting();
Boolean isWifi = manager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).isConnectedOrConnecting();
if(isWifi ){ ..... } else if(is3g){ ..... } else if(GPRS) {....}
For GPRS I have done like: https://stackoverflow.com/questions/6898568/how-to-get-the-gsm-strength-outside-method
Please anybody tell me how to take the GPRS connection.
(Sales rep must use GPRS connection available phone.)