Search in sources :

Example 6 with TaskStackBuilder

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;
}
Also used : Account(com.fsck.k9.Account) Intent(android.content.Intent) PendingIntent(android.app.PendingIntent) TaskStackBuilder(android.support.v4.app.TaskStackBuilder)

Example 7 with TaskStackBuilder

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;
}
Also used : LocalSearch(com.fsck.k9.search.LocalSearch) Intent(android.content.Intent) PendingIntent(android.app.PendingIntent) TaskStackBuilder(android.support.v4.app.TaskStackBuilder)

Example 8 with TaskStackBuilder

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;
}
Also used : Intent(android.content.Intent) PendingIntent(android.app.PendingIntent) TaskStackBuilder(android.support.v4.app.TaskStackBuilder)

Example 9 with TaskStackBuilder

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);
}
Also used : Intent(android.content.Intent) PendingIntent(android.app.PendingIntent) TaskStackBuilder(android.support.v4.app.TaskStackBuilder) NonNull(android.support.annotation.NonNull)

Example 10 with TaskStackBuilder

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();
}
Also used : Intent(android.content.Intent) Parcelable(android.os.Parcelable) TaskStackBuilder(android.support.v4.app.TaskStackBuilder)

Aggregations

Intent (android.content.Intent)39 TaskStackBuilder (android.support.v4.app.TaskStackBuilder)38 PendingIntent (android.app.PendingIntent)34 NotificationCompat (android.support.v4.app.NotificationCompat)20 NotificationManager (android.app.NotificationManager)14 Bitmap (android.graphics.Bitmap)13 InputStream (java.io.InputStream)10 IOException (java.io.IOException)8 URL (java.net.URL)8 Notification (android.app.Notification)7 Context (android.content.Context)5 Uri (android.net.Uri)5 SharedPreferences (android.content.SharedPreferences)3 Resources (android.content.res.Resources)3 Cursor (android.database.Cursor)3 RemoteViews (android.widget.RemoteViews)3 TaskStackBuilder (android.app.TaskStackBuilder)2 ContentResolver (android.content.ContentResolver)2 Bundle (android.os.Bundle)2 NonNull (android.support.annotation.NonNull)2