Android Question App in pause, when resumed go to MAIN activity instead of the current activity

Mike1970

Active Member
Licensed User
Hi everyone, i've an app with the Main activity used as Login form.
When i user log in i wrote:
B4X:
StartActivity("Home")
But if the user put the app in background and then opens it up from the homescreen (not from the recent apps) starts the Main activity instead of the Home activity (that is the activity in foreground before).

There is a way to open the app in the correct module?

Thanks
 

DonManfred

Expert
Licensed User
Main is always the default Activity which is started,

You can check if the user is already logged in and if so then start the home activity.
 

Mike1970

Active Member
Licensed User
Main is always the default Activity which is started,

You can check if the user is already logged in and if so then start the home activity.
Yeah, that was the plan B, i wished that there was a way.
I will do some graphical changes to hide the activity switches
 

Erel

Administrator
Staff member
Licensed User
I wouldn't use a second activity for this. You can use B4XPreferencesDialog or B4XDialog or any other custom form implementation. It will be simpler.
 
Top