Click on the notification received using GCM
<p>I am using GCM (Google Cloud Messaging) i am getting response frm server i have setup all but now i want that when i recieve the notification i want to click on that notification and then change it to other activity</p>

<pre><code>public class SamplePushActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TextView regNumber = (TextView) findViewById(R.id.textView1);

        GCMRegistrar.checkDevice(this);
        GCMRegistrar.checkManifest(this);

        if (GCMRegistrar.isRegistered(this)) {
            Log.d("info", GCMRegistrar.getRegistrationId(this));
        }

        final String regId = GCMRegistrar.getRegistrationId(this);
        regNumber.setText(regId);

        if (regId.equals("")) {
            // replace this with the project ID
            System.out.println("registration ID is " + regId);
            GCMRegistrar.register(this, "324912612242");
            Log.d("info", GCMRegistrar.getRegistrationId(this));
            System.out.println("Get Reg ID: " + GCMRegistrar.getRegistrationId(this));
            regNumber.setText(regId);
        } else {
            Log.d("info", "already registered as" + regId);
        }
    }
}
</code></pre>
