Detect exit from preferences screen

Cableguy

Expert
Licensed User
Longtime User
So, I re-direct my user to a preferences screen upon first-run, and the app the retrieves the user-entered data... But if for any reason, the user pauses the app, by going again into the preferences screen, wich I made available by a key pressing, when the user exits the preferences the app is halted completly, and no error is thrown...

How can I detect that the user has in fact exited the preferences screen???
Anyway to "inject" an exit event with the reflection lib??
 

stevel05

Expert
Licensed User
Longtime User
Very difficult without knowing more about what your program is doing.

For instance if the preferences screen is a separate activity within the app that you are starting with StartActivity, How does your app exit the activity when the user doesn't press a key. And how does your app exit the activity when the user does press a key?
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
...when the user exits the preferences the app is halted completly, and no error is thrown...

How can I detect that the user has in fact exited the preferences screen???

The user must press a button or something in order to exit the preferences. In the button's click event (for example), you can close the preferences screen/panel/whatever then wait for the user's next action.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I may not have expressed myself clearly enought...
When I say Preferences Screen, I mean Preferences Activity...using the prefences activity library...wich has NO event available...So even the back button press is NOT trapped.

On start-up, I check to see it the Preferences item count is diferent than zero, and if not, re-direct the user to enter the preferences...all goes well in that point.
My problem is when/if the user changes those preferences afterwards, during program flow...The Flow gets alted after the user returns to the program...
What I would like to do, is to, when the user exits the preferences Activity, to have the app Start/Re-Start from a given point...

[EDIT]
Using the logger I saw that the app is actualy Paused/Resumed so I setted a Flag to know if the resume is done after calling the Preferences intend...Seems to work OK
 
Last edited:
Upvote 0
Top