title: Can not initiate activity from GCMIntentService.class
body: <p>I have a GCMIntentService class, in which i get some messages returned from my server. I want to be able to start a certain activity when a certain message arrives at my app. For example if in my onMessage() method (onMethod() is the method, and the first place, in the app, that receives the messages from the server) arrives the string = "tomatoe", i want to start a specific activity. The way i know right now to start an activity, is this:</p>
  
  <pre><code>Intent resactivity = new Intent(getApplicationContext(), ResponseActivity.class);
              resactivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
              startActivity(resactivity);
  </code></pre>
  
  <p>The problem is that GCMIntentService, is not a class that extends activity, and i believe that i can't use this code for this purpose. Is there some way to initiate an activity from a class that is not an activity, by creating an intent inside that class?</p>