makeMessageIntentStack(this, from, message), PendingIntent.FLAG_CANCEL_CURRENT);
/** * Perform a switch to the app. A new activity stack is started, replacing * whatever is currently running, and this activity is finished. */ void switchToApp() { // We will launch the app showing what the user picked. In this simple // example, it is just what the notification gave us. CharSequence from = getIntent().getCharSequenceExtra(IncomingMessageView.KEY_FROM); CharSequence msg = getIntent().getCharSequenceExtra(IncomingMessageView.KEY_MESSAGE); // Build the new activity stack, launch it, and finish this UI. Intent[] stack = IncomingMessage.makeMessageIntentStack(this, from, msg); startActivities(stack); finish(); }
makeMessageIntentStack(this, from, message), PendingIntent.FLAG_CANCEL_CURRENT);
/** * Perform a switch to the app. A new activity stack is started, replacing * whatever is currently running, and this activity is finished. */ void switchToApp() { // We will launch the app showing what the user picked. In this simple // example, it is just what the notification gave us. CharSequence from = getIntent().getCharSequenceExtra(IncomingMessageView.KEY_FROM); CharSequence msg = getIntent().getCharSequenceExtra(IncomingMessageView.KEY_MESSAGE); // Build the new activity stack, launch it, and finish this UI. Intent[] stack = IncomingMessage.makeMessageIntentStack(this, from, msg); startActivities(stack); finish(); } //END_INCLUDE(app_launch)