366 questions
1
vote
1
answer
102
views
java.lang.IllegalStateException: Failed to find type for when decoding androidx.lifecycle.SavedStateHandle@8019b8e
Hello I am receiving the error in the title based off the following code:
class MainViewModel (application: Application, private val savedStateHandle: SavedStateHandle) : AndroidViewModel(application){...
1
vote
0
answers
153
views
Problem Restoring state in Jetpack compose Navgation navigating several composables
I have this simple NavHost containing three Composables First Second and Third
@Composable
fun Navigation() {
val controller = rememberNavController()
Column {
NavHost(navController = ...
3
votes
1
answer
2k
views
How to Save and Restore WebView State in Android Jetpack Compose?
I was previously saving my WebView state in my Android app by overriding onSaveInstanceState(outState: Bundle) method inside the Activity class like this:
override fun onSaveInstanceState(outState: ...
0
votes
0
answers
50
views
Does Firebase Remote Config Can Survive Process Death?
With process death being the ultimate silent killer culprit of an Android app, does Firebase Remote Config survive system-initiated process death or do we still need to handle the recovery using Saved ...
0
votes
1
answer
51
views
How to save the State(tff.learning.templates.LearningAlgorithmState) and again load it to resume the training process
This is my evaluate function for federated learning:
def evaluate(num_rounds=10):
state = trainer.initialize()
for round in range(num_rounds):
t1 = time.time()
state, metrics = ...
1
vote
0
answers
740
views
PrimeNG table save filters state in URL query params. Angular
I need to save the state of the PrimeNG table(p-table) filters in the query parameters of the url.
I know that PrimeNG has built-in features for saving state to local storage, but this method does not ...
1
vote
0
answers
98
views
how can I save measurementUnits correctly Imperial (F)", "Metric (C) in jetpack compose?
I am developing a weather application and I want to save measurementUnits in SettingsScreen user can choose Imperial Fahrenheit or Metric Celsius after choosing one of this user click save button it ...
1
vote
0
answers
125
views
How to continue with last screen when i exit or app is crashed on Android with Compose
I'm trying to create something for the Android app using Compose and navigation, to make it possible to continue with the last screen I was showing to the user if an app crashed or been killed by the ...
0
votes
2
answers
285
views
How can Saved Instance State read/write to disk in Android?
According to Android developer documentation as of March 1, 2023, Saved Instance State is slow to read/write.
This is because it requires a serialization/deserialization process and requires disk ...
0
votes
2
answers
681
views
React.js - AsyncStorage: Have to press button twice to save the correct value i want
I am trying to create a button that when i click it it will be disabled and when i reload the app it will stay disabled , until i press clear.
The problem is i have to click twice to get the result i ...
0
votes
1
answer
29
views
android recyclerview restoring state in object
The app functionality is similar to shopping cart. User can add products and increase/decrease quantity by clicking on respective buttons. By default the quantity value is set to 1. I am facing a ...
0
votes
0
answers
936
views
Prevent Android NFC Intent from re-calling onCreate and/or save a variable despite reloading state
I've been working on an Android NFC application on Android Studio, and I've hit a major roadblock. Basically, everytime my app detects a new NDEF NFC Tag, a new intent is created, and MainActivity ...
0
votes
0
answers
177
views
Unable to access app specific internal Storage
I'm trying to save state during rotation and repopulate a list with specific files I've created in internal app storage.
currentFile = new File(this.getFilesDir(), timeString);
After accessing the ...
0
votes
1
answer
2k
views
Datatables - Keeping only selected page number(not order or search or filter) after callback and clear on refresh
I have a data table which I should change something on it, for example, I want to change the title of the content, but this content is on the 6th page of the table. When I change it, the data table ...
0
votes
1
answer
166
views
is there way to preserve the value of variable state to show in textview after switching between light and dark modes
i am new to this, i am trying to build app that counts how many times button is clicked
i have a variable called count that keeps count of how many times a button is clicked and shows that in textview ...
0
votes
0
answers
322
views
Save state in Android
I'm currently writing an app that displays a list of movies using a recyclerview. I have a bottom navigation bar(trending, search and favorites) with several fragments. I'm trying to save the state of ...
1
vote
0
answers
142
views
Installing App via Android Studio reverts back my old app save state (WebView LocalStorage)
I am currently deploying a web app to my own physical Xiaomi Mi Note 10 device with Android Studio, built with capacitor. But everytime i install a new version to my phone, it reverts back an old save ...
1
vote
1
answer
116
views
Saving recyclerview items with savestate
I'm currently writing an app that displays a list of movies. The app has 8 fragments that contain the recyclerview: Trending Movies, Action, Comedy, Horror, Romance, Scifi, Search, and Favorites.
The ...
0
votes
1
answer
2k
views
How can i save pagination, sort, search state of a table in Angular 8? I am using angular2-datatable
I have a table showing a list of items. I clicked on one item in page 3 and navigated to details page of that item. Now after completing task in details page when i navigate back to table page, i want ...
0
votes
0
answers
91
views
Save states of multiple activities - Android Application
I have read many posts about how to save a state of an activity using ViewModel and onSaveInstanceState(), however, I couldn't find something that explains the possibility of saving multiple ...
7
votes
1
answer
4k
views
How to use popUpToSaveState and restoreState to save and keep state in Navigation Component Android Kotlin?
I am using Navigation Component to handle navigations, but when use popBackStack() or onBackPressed() to back to previous fragment my onViewCreated call again in fragment with api and set up views.
...
0
votes
1
answer
206
views
Save state after refresh
**I have made login logout authentication in react by node and database after login when i refresh the page my cookie save state for login but my navbar menu failed to show me log out its show me ...
1
vote
0
answers
103
views
Saving State In Fragment With ViewPager Android Studio
Need a little help on how to approach saving state in my single activity application. I looked at a few resources but couldn't quite find one that fits the build. Essentially I have single activity ...
2
votes
3
answers
1k
views
Save a file by appending the original file name
I am running CFD simulation using Star-CCM+ which uses Java API. Star-CCM+ writes macros in java but I do not know the language at all. I want to manipulate parameter values in my simulations and then ...
1
vote
1
answer
747
views
How to save Gamestate Objects in python?
We are making a reinforcement learning algorithm for our class. And in this progress we want to make a savestate for a nes-game which is made using the gym-retro package. We have tried using pickle to ...
0
votes
1
answer
32
views
OnScreenRotation with RecyclerView in tabbed Activity
I am using a tabbed Activity. In one of the tabs I have two buttons and a Recyclerview. In the RecyclerView I have two spinners and an edittext.
The purpose of the first button is to add a new item in ...
1
vote
0
answers
589
views
ViewModel SaveStateHandle with Koin DI
I try to preserve viewModel data against activity re-creation , but on onCreate() method from Fragment I got the following error : java.lang.IllegalArgumentException: SavedStateProvider with the given ...
0
votes
1
answer
169
views
Save and restore total app state after exit (app has 1 activity and 1 RecyclerView)
After poking through threads on the subject I still cannot figure out what to do. The thing is, I have a quite simple app, which has just one activity and one recycler view, where user can add some ...
0
votes
2
answers
830
views
How to handle config changes in ViewModel
I have simple registration form. When I enter data and change configuration the data is lost. I use ViewModel in my project and official documentation says ViewModel can handle orientation change ...
0
votes
1
answer
1k
views
Flutter save state of an app when you exit the app (The app starts from login page after logging in the home page)
I am new to Flutter and REST API, so take it easy on me. My app is supposed to save its state according to YouTube videos that I have learnt. However, when I login and exit the app, the next time I ...
1
vote
0
answers
118
views
onRestoreInstanceState is not called when custom views are generated programmatically
I have an application where all the UI comes from a server, so the views are all custom and generated programmatically. Additionally, I have to remove all the views and re-create them when the device ...
0
votes
1
answer
316
views
SaveStateHandle ViewModel: Save an Interface (Callback)
Repository:
fun interface AllUsersQueryCallback{
fun getAllUsers(allUsers: LiveData<ArrayList<User>>)
}
private const val TAG = "SearchRepository"
class SearchRepository @...
2
votes
1
answer
1k
views
How to store recyclerview data , while changing view (Fragments) via Bottom Navigation?
I am following this question
how to store recyclerview data on onSaveInstanceState
I also found
How to save state of view class? and Fragment save view state.
Context
I give data in form of DataModel (...
0
votes
1
answer
446
views
How to convert ViewModel to utilize state saving?
I have a ViewModel I am currently using to contain data and share values between Fragments. This model also helps instantiate the data for the app on activity start.
I am now trying to add in state ...
6
votes
1
answer
701
views
How could I copy the RAM of a running application, save it, and reload it into RAM later on?
I play modded Minecraft a fair bit. One downside to that is it takes a lot of time for all the mods to compile whenever I launch Minecraft. It can take around 15 minutes or so, which is too much time ...
0
votes
2
answers
96
views
Why does saveStateInstance not work on screen orientation?
I am making a tour guide app that is made up of one main activity with and two fragments. The top fragment contains a list of cities and when you clock on a city the bottom fragment displays a ...
2
votes
1
answer
3k
views
How to save installed modules in colab?
There is a problem whenever I install a module in google-colab like speechrecognition module,
it works perfectly but then if I open a new tab of colab or open colab again after closing it,
it doesn't ...
1
vote
0
answers
176
views
Problem with restoring webview state after app installation
I have a simple android app with WebView which opens the site main page. I need to save WebView state when the user presses "home" or "main menu" buttons. And then, when user opens app from the ...
1
vote
1
answer
423
views
How to save my current state by using json or something else in Flutter
I want to know how to save my current state by modifying the existing JSON file. but I can't find a way to saving..... So I want to ask you about that.
The size of the JSON file is not so big. So I ...
2
votes
1
answer
591
views
How to save the state of delayed posts in Kotlin
For an Android app I have some content that I want to show with a delay. Therefore I'm using a handler.
private lateinit var mHandler: Handler
override fun onCreate(savedInstanceState: Bundle?) {
...
0
votes
1
answer
460
views
Why is onSaveInstanceState() not called after pressing "back" button?
I'm creating a bowling score application which will include a bingo game. To simplify, at the Score class, there is a button which will start a new activity (Bingo class). While in the game, for sure ...
0
votes
1
answer
142
views
How can I keep the selection of a radio button on a form if a page reloads
Good day,
Part of a form I created consists of two groups of radio buttons that display specific text depending on which button is selected.
If a user clicks the submit button, but hasn't incorectly ...
2
votes
2
answers
415
views
How to save fragments states to avoid re-creating them
I've implemented something like the below picture:
I have some Tabs and every tab may have some buttons which load some different fragments. In this situation, in Tab 1, Button 1 loads Fragment 1, and ...
1
vote
1
answer
152
views
Python - Recommended way to show game save files to user
Searching online, I found a lot of tutorials for saving/loading program data into/from files. However, I already know this (I am using Python pickle to serialize/de-serialize objects).
My question is ...
0
votes
0
answers
115
views
saveState in destructor of QMainWindow
Is it correct to call saveState method in destructor of QMainWindow?
Or should I do it in QMainWindow::closeEvent (as in documentation)?
I have problems in some project with saving state from ...
0
votes
0
answers
34
views
When I close my app, all the dynamically generated content is gone, so how can I save the generated content?
Does anyone have any idea how I can save the dynamically generated Textviews? So, the next time I open the app, the TextViews will display the same content that I previously put into them.
I have ...
0
votes
0
answers
50
views
How to restore all user running apps after system reset?
I am developing android launcher and I want to save state of all currently running apps(audio player, calendar e.t.c), before reset device.After reset, relaunch all previously running apps in their ...
3
votes
0
answers
548
views
How to save sate of bottom navigation view fragments with use of new android jetpack navigation?
I have a problem with saving the state of fragments which work with bottom navigation view. I am using the new android jetpack navigation library and it is really simple to code bottom navigation with ...
-1
votes
2
answers
84
views
How to save Setting for next time?
I am working on my application and I want to change the color of their UI with the click of button.....Like this....
Button change=findViewById(R.id.change_UI);
change.setOnClickListener(new View....
1
vote
2
answers
1k
views
Singleton Fragment or save web view state
Here what i want is i have a fragment inside an Activity and it has a web view which is basically chat to customer service. This activity will be started from a button in another activity,
Now the ...