networking - Listen/register 2G 3G change on android -


i know how know network type :

telephonymanager telmanager = (telephonymanager) context.getsystemservice(context.telephony_service); int network_type = telmanager.getnetworktype(); 

but want register when phone switch 2g 3g or 3g 2g...

anyway ?

thanks helping me. regards jim

you should use phonestatelistener class. contains method ondataconnectionstatechanged (int state, int networktype).

hope help.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

java - where to store the user credentials in an enterprise application(EAI)? -

openxml - Programmatically format a date in an excel sheet using Office Open Xml SDK -