back-stack

Android low memory killer & application back stack

你。 提交于 2021-02-07 20:59:29
问题 Android system may decide to remove an application process when the system is low on memory, so to reclaim resources for more important work ( ie. to start a service belongs to another application ). However, I couldn't be sure if it's possible for the Android system to remove ONLY application task ( back stack ) without touching the corresponding app process? If this is possible, it's also possible the system destroys the back stack activities by performing a call to each onDestroy()

Android low memory killer & application back stack

本小妞迷上赌 提交于 2021-02-07 20:57:50
问题 Android system may decide to remove an application process when the system is low on memory, so to reclaim resources for more important work ( ie. to start a service belongs to another application ). However, I couldn't be sure if it's possible for the Android system to remove ONLY application task ( back stack ) without touching the corresponding app process? If this is possible, it's also possible the system destroys the back stack activities by performing a call to each onDestroy()

Recreating backstack with Android Navigation Architecture Component

丶灬走出姿态 提交于 2020-08-22 05:12:43
问题 I am trying to implement navigation to specific Detail pages of my app using PendingIntent from a notification, however I am having problems recreating the backstack from the Detail page all the way back to the start destination. I made a sample app here with a single activity and three fragments to demo this: Fragment 1 -> Fragment 2 -> Fragment 3 (start dest) <- <- From Fragment 1 (the start destination), I navigate directly to Fragment 3 using Navigation.findNavController(this, R.id.nav

Recreating backstack with Android Navigation Architecture Component

假装没事ソ 提交于 2020-08-22 05:09:28
问题 I am trying to implement navigation to specific Detail pages of my app using PendingIntent from a notification, however I am having problems recreating the backstack from the Detail page all the way back to the start destination. I made a sample app here with a single activity and three fragments to demo this: Fragment 1 -> Fragment 2 -> Fragment 3 (start dest) <- <- From Fragment 1 (the start destination), I navigate directly to Fragment 3 using Navigation.findNavController(this, R.id.nav

Opening the App from Recents opening the old activity in Android?

喜夏-厌秋 提交于 2020-06-28 03:57:14
问题 I have 4 Activities: Launcher, MainActivity(SingleTask), NotificationActivity, ExampleActivity. When the user clicks on the notification, NotificationActivity opens then ExampleActivity and finishes the NotificationActivity . When I press back MainActivity opens. Now if I press back, the application gets closed. If the user then opens the app from the recent Tasks, NotificationActivity opens then ExampleActivivty . But if the user opens the app from the icon, Launcher Activity opens then

popBackStack causes calling oncreateView of fragment again and again

南楼画角 提交于 2020-03-18 03:43:17
问题 I have 3 fragment A, B,C.I wrote piece of code for replacing them and maintaining backstack: public void addFragment(Fragment fragmentToAdd, String fragmentTag) { FragmentManager supportFragmentManager = getSupportFragmentManager(); Fragment activeFragment = getActiveFragment(); FragmentTransaction fragmentTransaction = supportFragmentManager .beginTransaction(); if (null != activeFragment) { fragmentTransaction.hide(activeFragment); } fragmentTransaction.replace(R.id.layout_child_activity,

How to exclude from recents an exported activity?

半世苍凉 提交于 2020-02-20 08:18:21
问题 I have an app with an exported activity that can be invoked from other apps (Specifically the sharing action - android.intent.action.SEND ) How can an exported activity be excluded from recents? I don't see a way to set the FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS flag, because it is invoked from the outside. The reason I want to do this is because this intent becomes the last one in my activity stack, thus when clicking on the recents, a file is being re-shared instead of the main activity to pop

How to exclude from recents an exported activity?

心已入冬 提交于 2020-02-20 08:17:48
问题 I have an app with an exported activity that can be invoked from other apps (Specifically the sharing action - android.intent.action.SEND ) How can an exported activity be excluded from recents? I don't see a way to set the FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS flag, because it is invoked from the outside. The reason I want to do this is because this intent becomes the last one in my activity stack, thus when clicking on the recents, a file is being re-shared instead of the main activity to pop

Android deep linking - Back stack

旧巷老猫 提交于 2020-02-18 07:38:33
问题 I am trying to implement deep linking in my Android application. I have been following this guide. I have an Android Activity that is started from and intent-filter in the Android manifest: <activity android:name=".MyActivity" android:parentActivityName=".MainActivity" > <intent-filter android:label="@string/filter_title_deep_link"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category

TabLayout ViewPager Not Loading When Using Backstack [duplicate]

百般思念 提交于 2020-01-31 11:07:05
问题 This question already has an answer here : Lifecycle of a replaced ViewPager and BackStack? (1 answer) Closed 4 years ago . I'm using a TabLayout in one of my fragments with a viewPager to switch between two fragments below the tabs. When I click the FAB inside one of the lower fragments, I load a new fragment (for input). However- when I press the BACK button, the TabLayout shows up but WITHOUT either of the lower fragments (represented by the pages). So what am I doing wrong? and is there a