i am doing given below but it is giving exception unable to instantiate activity
java.lang.InstantiationException
below is my code>
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();
try as: