我在下面给出,但它给出了无法实例化活动的异常
java.lang.InstantiationException
下面是我的代码>
public class GetDeviceIdActivity extends Activity{
Context myContext;
public GetDeviceIdActivity(Context myContext)
{
this.myContext = myContext;
}
TelephonyManager telephonyManager = (TelephonyManager)myContext.getSystemService(Context.TELEPHONY_SERVICE);
String imei = telephonyManager.getDeviceId();