我似乎无法在 android 中声明 TelephonyManager,这就是我想要做的:
TelephonyManager tele = Context.getSystemService(Context.TELEPHONY_SERVICE);
我这样做对吗?
最佳答案
你忘记施法了。它应该看起来像这样:
TelephonyManager tele = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
关于android - TelephonyManager 实例化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7004848/