android - TaskStackBuilder not working -
i trying create synthetic stack not working. here code.
intent resultintent = new intent(context, notificationlistscreen.class); resultintent.setflags(intent.flag_activity_multiple_task); taskstackbuilder stackbuilder = taskstackbuilder.create(context); // adds stack stackbuilder.addparentstack(notificationlistscreen.class); // adds intent top of stack stackbuilder.addnextintent(resultintent); // gets pendingintent containing entire stack pendingintent resultpendingintent = stackbuilder.getpendingintent(0, pendingintent.flag_update_current); // puts pendingintent notification builder builder.setcontentintent(resultpendingintent); // kills notification when user clicks on builder.setautocancel(true);
manifest entry
<activity android:name=".modules.notification.notificationlistscreen" android:screenorientation="portrait" android:configchanges="keyboard|keyboardhidden|screenlayout|screensize|orientation" android:label="@string/title_activity_notification_list_screen" android:parentactivityname=".modules.splash.splashscreen"> <meta-data android:name="android.support.parent_activity" android:value=".modules.splash.splashscreen"/>>
i went through android - build notification, taskstackbuilder.addparentstack not working trouble shooting.
Comments
Post a Comment