dear friends,
i use following code to check 3g,edge connectivity in android phone application
public boolean isConnected()
{
try
{
final ConnectivityManager conn_manager = (ConnectivityManager)
this.getSystemService(Context.CONNECTIVITY_SERVICE);
final NetworkInfo network_info = conn_manager.getActiveNetworkInfo();
if ( network_info != null && network_info.isConnected() )
{
return true;
}
else
{
return false;
}
}
catch (Exception e)
{
return false;
}
}
if i connect it to wifi then this check does not work correctly actually when wifi is connected to network and internet coverage is not there above check say ok infact its wrong any one guide me how to handle packet lost case like
internet comming then disconnnecting and this process keeps continue in android ? or am i doing something wrong?
any help would be appreciated.