Monday, 19 August 2013

Programmatically get the network operator's time (android)

Programmatically get the network operator's time (android)

I need to get the current time for my android app. The time should be
operator's time and not the local time set by the user.
TelephonyManager telephonyManager
=((TelephonyManager)Context.getSystemService(Context.TELEPHONY_SERVICE));
String operatorName = telephonyManager.getNetworkOperatorName();
This is to get the operator's name programmatically. But how to get the
operator's current time? If the user has changed the time manually, then
the app will change it to operator's current time.
I did a google search too :
Unable to find a better one. If its already asked on stackoverflow, excuse
and please provide the link.
Thanks. (sorry for bad English)

No comments:

Post a Comment