Questions tagged [taskstackbuilder]

Utility class for constructing synthetic back stacks for cross-task navigation on Android 3.0 and newer.

TaskStackBuilder provides a backward-compatible way to obey the correct conventions around cross-task navigation on the device's version of the platform. On devices running Android 3.0 or newer, calls to the startActivities() method or sending the PendingIntent generated by getPendingIntent(int, int) will construct the synthetic back stack as prescribed. On devices running older versions of the platform, these same calls will invoke the topmost activity in the supplied stack, ignoring the rest of the synthetic stack and allowing the back key to navigate back to the previous task.

35 questions
2
votes
2 answers

Android TaskStackBuilder.startActivities() doesn't work as expected

Possible douplicate of Android - Build a notification, TaskStackBuilder.addParentStack not working Although there are a lot of questions answered about this topic but none of them solved my problem. I'm actually, playing with all of them but…
Hesam
  • 52,260
  • 74
  • 224
  • 365
1
vote
1 answer

Android TaskStackBuilder addNextIntentWithParentStack freezes app

I am trying to show a notification from a BroadcastReceiver in my app, but creating the parent stack is giving me problems. The app just freezes (no exception, just freezes) when I call the following code Intent notifIntent = new Intent(context,…
Ed0
  • 11
  • 4
1
vote
1 answer

Manipulating task back stack in android

` public void SignOut(View view) { Intent intent = new Intent(getApplicationContext(), MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); finish(); } `I have an android…
1
vote
1 answer

back stack navigation when opening the app from a widget is not working

I want to launch the DetailActivty when the user clicks a product from widget the code i use is this. to set the PendingIntentTemplete ProductWigetProvider.class Intent detailActivityIntent = new Intent(context, ProductDetailActivity.class); …
1
vote
2 answers

Keep calling activity and clear other activities before that

I am calling activities in the following order A>B>C>D, now I want to call Activity A and clear B and C but keep D. I am calling A with Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP. But all the activities apart from A is getting…
Aju
  • 4,597
  • 7
  • 35
  • 58
1
vote
1 answer

Activity in launchMode singleTask gets destroyed when started via TaskStackBuilder

I have an activity A, declared in Manifest with android:launchMode="singleTask" and another activity B that has no further attributes. As far as I know, if there is already some task running activity A, instead of creating a new instance, the…
JacksOnF1re
  • 3,336
  • 24
  • 55
1
vote
0 answers

Tap on Notification from locked screen opens Wrong Activity first

Below function displays a notification which pending intents. When the screen is unlock and receive notification, below method will create a notification. When user tap on notification, it opens first ChildActivity, On backpress, it closes child…
1
vote
1 answer

TaskStackBuilder not working correctly when launch activity twice from home screen

I have 2 Activities MainActivity - with 4 tabs ContactActivity I make two intents in TaskStackBuilder so the ContactActivitywill appear first and after it MainActivity when i click on notification. TaskStackBuilder stackBuilder =…
1
vote
1 answer

TaskStackBuilder creates a Blank Screen before loading activity in android

While using TaskStackBulider for removing previous pages, Intent i = new Intent(DeepLinkingActivity.this, HomePageclass); i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); …
KP_
  • 1,854
  • 25
  • 43
0
votes
0 answers

installing stack builder for Postgres

when I try to install stack builder after installing postgres, this error message appears : Failed to parse the application list: http://www.postgresql.org/applications-v2.xml please help me solve this problem I am trying to install stuck builder…
0
votes
2 answers

Clear the back stack during animation

Let us say I have 4 activities, A,B,C and D. Activity A starts B, B starts C using Intent. A button click in Activity C starts D. Clicking back button or closing Activity D should take me to Activity A. I have achieved this by starting Activity A…
0
votes
0 answers

TaskStackBuilder vs normal startActivity again and again

I am familiar with using taskStackBuilder that it keeps a fake backstack of your activities but i was wondering one thing that we can obtain this behavior by calling startActivity() again and again as per our requirement, then why should we use…
0
votes
0 answers

Resume an activity which is present in different task instead of creating new activity on same task

I have an activity A in a task T1. Now, I call Activity B which gets opened on a new task T2 (because B's launch mode is "singleTask"). Now I want to go from B to A again. In this case I do not want a new instance of activity A in task T2. Instead I…
0
votes
2 answers

Changes are not applied to all the activities

I implemented night mode in my app.User can change the night mode settings in profile activity.The order of activities are as follows. TabbedActivity>>DisplayActivity,ProfileActivity The changed settings are applied only in current activity.(i.e…
0
votes
4 answers

Not Navigating back to MainActivity

When I click on Notification I should be navigated to Main2Activity and when I click on back button of Main2Activity I should be navigated back to MainActivitybut I am getting navigated back to Home screen. Is there any mistake in my code? …