Application stops automatically if not used ?

jnbarban

Member
Licensed User
Longtime User
Hi everyone, i need help...

My context :
I have developped a big application. This application is deployed on samsung galaxy tab 1 or galaxy tab 2 and she is used by almost 150 persons.

The probleme :
Many of users tell me that if ,when he use the application, he let the galaxy tab for a momments on inactivity (screen shutdown, or "home" button in order to make something else with the galaxy tab...), When he restart the application, she start like at first time. Users have lost all that he has done on the activity of the application before the inactivity periode.

My question :
Why the application was shutdown if user doesn't exit the application?


I hope you understood my probleme and anyone help me to let my application active if i didnt choose to exit the application.

thanks
 
Last edited:

jnbarban

Member
Licensed User
Longtime User
Thanks Erel. But i can't use StateManager in order to fix my probleme.

I Hope this small scheme can explain what is my probleme:

Architecture application.jpg


When users are on "Activity 1 Bis" and the application was put in pause (screen shutdown, home button...)

- sometimes, the application resume on "Activity 1 bis" --> Nothing have change , it's that i want.

- But sometimes, the application restart on "Main" --> all are lost : to bad for users


I read StateManager function ( really good function ) but don't thinks that fix my probleme, the context can't be the same as before the activity pause. (Data base connection, sql request result...)

Do you know what i mean ?
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
You should rebuild the UI every time, that's the obvious unfortunately. Apart from the stateManager, I tend to use flags informing my app to which exact activity the 'pause' happened and return there, forcing it to rebuild the UI based on saved variables received. You are using listBoxes, that's fine, as long as you save their data to a temporary area, be it a map, or even a temporary sql table.
 
Upvote 0
Top