use of android.support.v4.app.TaskStackBuilder in project k-9 by k9mail.
the class NotificationActionCreator method buildMessageViewBackStack.
private TaskStackBuilder buildMessageViewBackStack(MessageReference message) {
Account account = Preferences.getPreferences(context).getAccount(message.getAccountUuid());
String folderName = message.getFolderName();
TaskStackBuilder stack = buildMessageListBackStack(account, folderName);
Intent intent = MessageList.actionDisplayMessageIntent(context, message);
stack.addNextIntent(intent);
return stack;
}
use of android.support.v4.app.TaskStackBuilder in project k-9 by k9mail.
the class NotificationActionCreator method buildUnreadBackStack.
private TaskStackBuilder buildUnreadBackStack(final Account account) {
TaskStackBuilder stack = buildAccountsBackStack();
LocalSearch search = Accounts.createUnreadSearch(context, account);
Intent intent = MessageList.intentDisplaySearch(context, search, true, false, false);
stack.addNextIntent(intent);
return stack;
}
use of android.support.v4.app.TaskStackBuilder in project k-9 by k9mail.
the class NotificationActionCreator method buildAccountsBackStack.
private TaskStackBuilder buildAccountsBackStack() {
TaskStackBuilder stack = TaskStackBuilder.create(context);
if (!skipAccountsInBackStack()) {
Intent intent = new Intent(context, Accounts.class);
intent.putExtra(Accounts.EXTRA_STARTUP, false);
stack.addNextIntent(intent);
}
return stack;
}
use of android.support.v4.app.TaskStackBuilder in project android-oss by kickstarter.
the class PushNotifications method projectContentIntent.
@NonNull
private PendingIntent projectContentIntent(@NonNull final PushNotificationEnvelope envelope, @NonNull final String projectParam) {
final Intent projectIntent = new Intent(context, ProjectActivity.class).putExtra(IntentKey.PROJECT_PARAM, projectParam).putExtra(IntentKey.PUSH_NOTIFICATION_ENVELOPE, envelope);
final TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(context).addNextIntentWithParentStack(projectIntent);
return taskStackBuilder.getPendingIntent(envelope.signature(), PendingIntent.FLAG_UPDATE_CURRENT);
}
use of android.support.v4.app.TaskStackBuilder in project iosched by google.
the class TaskStackBuilderProxyActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TaskStackBuilder builder = TaskStackBuilder.create(this);
Intent proxyIntent = getIntent();
if (!proxyIntent.hasExtra(EXTRA_INTENTS)) {
finish();
return;
}
for (Parcelable parcelable : proxyIntent.getParcelableArrayExtra(EXTRA_INTENTS)) {
builder.addNextIntent((Intent) parcelable);
}
builder.startActivities();
finish();
}
Aggregations