How can i use getSystemService in a non-activity class?
<p>Please bear with me, as I am learning Java simultaneously as I program with Android.</p>

<p>I am building an application which triggers an alarm via AlarmManager.</p>

<p>I would like to be able to call the Alarm via it's own non-activity class, but since I am not extending Activity, I don't appear to have any 'context'. This concept confuses me, and i've read the sdk docs. </p>

<p>How would I go about using </p>

<pre><code>    alarmTest = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
</code></pre>

<p>in my non-activty class?</p>

<p>Also, I'm assuming getting context will allow me to use SharedPrefs and Intents in my non-activity class as well?</p>

<p>Thanks in advance.</p>
