Answer the question
In order to leave comments, you need to log in
How to organize the storage and transfer of data in the application between Activities?
There are several Activities, each accepting data from the user.
On the first one, the name is entered, on the second, the date, on the third, some other information is entered.
On the last screen, all collected information is sent to the server.
How to properly store this temporary information?
Due to the large number of transitions - Putextra is not suitable.
I thought to use a temporary table in sqlite, but hesitated.
Now I use the Application class, all data is stored in the properties of this class.
How is it right anyway?
Answer the question
In order to leave comments, you need to log in
1) You can make 1 activity and 4 fragments.
2) You can present the received data as a class, and with each intent to a new activity, transfer a seriazable object.
You can temporarily store in preferences, and clean them after sending.
It is quite possible to drive the same Bundle. This is not labor intensive and will protect against unloading, since the application will start from the same place with the same Intent.
Bundle data = getIntent.getExtras();
data.putString( "param100500", "ДЖИГУРДА" );
Intent intent = new Intent( this, Activity100501.class );
intent.putExtras( data );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question