can one use getPackageManager in a function which doesn't have a context?
<p>This question is a little bit hard to ask:</p>

<p>With a Timer, a method is started each 5 seconds, and inside this function I need to know what activities are actually running so I write :</p>

<pre><code>public class ProcessesCheck extends TimerTask {

@Override
public void run() {
   Log.w("hello", "my name is Nicolas".concat( String.valueOf( SystemClock.uptimeMillis() )));
   Context.getPackageManager();
       etc.....
}
</code></pre>

<p>}</p>

<p>the run method is run each 5 seconds.</p>

<p>But the problem is that I don't have Context, and I even can't instantiate a my_context object, in order to get the method getPackageManager.</p>

<p>So the line :'Context.getPackageManager();' have an error!</p>

<p>Does someone know how to launch getPackageManager in the method "run"?</p>

<p>Thanks for your help</p>
