How to get getSystemService using myConext
<p>i am doing given below  but it is giving exception unable to instantiate activity</p>

<blockquote>
  <p>java.lang.InstantiationException</p>
</blockquote>

<p>below is my code></p>

<pre><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();
</code></pre>
