@Override
protected void onMessage(Context context, Intent intent) {
Log.e("C2DM", "Neue Message.");
Intent resultIntent = new Intent(context, ResultActivity.class);
resultIntent.putExtra("message", "Message received");
resultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
I can see from my logcat that i get into this method, then when it tried to start the activity, it throws the fatal exception as written in title with the following comment:
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? (my reply to AndroidRuntime is: "Isn't that what I'm doing?") ;-)