201 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
48
views
How i persist email after navigating from current page and returning back?
the logic i wish to implement is that i'm current at my MagicLinkScreen where user enter email, if email is valid it forward user to another screen that open mails app. Now when i navigate back from ...
1
vote
0
answers
45
views
How to know if fragment is recreated after back press and popBackStack()?
I have a two fragments, A and B. Let say fragment A is a person form and B is a city searcher.
In fragment A, I query the database server for some data, and until I get this info I display a ...
0
votes
0
answers
30
views
Problem with savedInstanceState after restarting app
I would like to save a simple integer value beyond the end of an app. I use savedInstanceState for this.
I used the following code in my fragment:
override fun onSaveInstanceState(outState: Bundle) {
...
1
vote
0
answers
66
views
Parcelable extension for Kotlin is not working as intended - throwing Exception
I want to save my result from API inside SavedStateHandle for my ViewModel.
For this reason I made all of my data Parcelable to make this function.
Code:
@Parcelize
data class DataResult(
val ...
0
votes
1
answer
77
views
Android Studio Progress Bar Orientation not saved
I currently have a progress bar that tracks the progress on music files however upon different orientation it doesn't seem to want to update and just stuck at the previous location ?
private ...
0
votes
1
answer
184
views
When I try to send intent to activity was being displayed using app link, new activity is created
My app implements OAuth 2.0 using a custom tab and App Link, and obtains data sent with a redirect URL through App Link through onNewIntent().
I'm trying to send a method to send this data to the ...
0
votes
0
answers
166
views
Activity gets restarted after Biometric Authentication
val promptInfo = BiometricPrompt.PromptInfo.Builder()
.setTitle("Biometric authentication")
.setSubtitle("Verify using your biometric ...
0
votes
1
answer
53
views
I wanted to used SaveInstanceState
I wanted to use SavedInstanceState to save the data of the Recycler View and other associated data I have like the title etc.(This is a cart Activity basically where all the data gets collected from ...
0
votes
0
answers
33
views
Is this correct regarding fragment state loss transactions for safe transactions?
is
if (isStateSaved()) {
commitAllowingStateLoss()
} else {
commit()
}
same as
commitAllowingStateLoss()
As the method internals are the same with only diff of throwing IllegalStateException?
If ...
6
votes
1
answer
2k
views
What is difference between SavedStateHandle and rememberSaveable?
As far as I know, with Android Compose,
SavedStateHandle is used with ViewModel and follows the ViewModel lifecycle and key-value map and it can be used as flow.
rememberSaveable is used with ...
14
votes
0
answers
876
views
Is SavedStateHandle in ViewModel and currentBackStackEntry the same?
I want to pass some data using savedStateHandle from activity straight to fragment's viewModel.
In my activity I have:
navController.addOnDestinationChangedListener { controller, _, _ ->
...
0
votes
1
answer
644
views
Can't Pass Bundle argument from Fragment to Viewmodel
I am learning mvvm. I want to pass frgment bundle argument in ViewModel savedstatehandle .I am using Hilt-Dagger. Please help me. Everytime savedstatehandle is null.
here is my code.
FIRST FRAGMENT:
@...
2
votes
2
answers
2k
views
How can I access "androidx.savedstate.ViewTreeSavedStateRegistryOwner" in Jetpack Compose 1.2.0?
I was able to access the below when I'm in Jetpack Compose 1.1.1
import androidx.savedstate.ViewTreeSavedStateRegistryOwner
However, when switching over to Jetpack Compose 1.2.0, I can no longer ...
2
votes
2
answers
801
views
Fragment onSaveInstanceState() called after onDestroyView()
The application started to receive some crashes (it is not reproducible 100%) due to some lifecycle issue for the Fragment.
I'm using view binding and I'm manually invalidating the binding as per ...
0
votes
1
answer
193
views
How to benefit on "warm start" from the saved instance state bundle passed into onCreate() or onRestoreInstanceState()
After reading these Android documents, we feel confused about how to benefit on "warm start issue" from the saved instance state bundle passed into onCreate() or onRestoreInstanceState(().
...