How to handle gcm notification onReceive behaviour depends on notification type
<p>I have 3 types of notifications in android received from GCM.Audio/Video call and msg. How to  open different activity on different notification. THis is how I open activity on click of notification.
GcmBroadcastReceiver.java</p>

<pre><code>public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
    ComponentName comp = new ComponentName(context.getPackageName(),
            GCMNotificationIntentService.class.getName());
    startWakefulService(context, (intent.setComponent(comp)));
    setResultCode(Activity.RESULT_OK);
    Intent i = new Intent(context, MainActivity.class);
    i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(i);


}
</code></pre>