Android Question Return from activity

Massimo66

Member
Hi, i'm new.
i have the first activity es: ORDER with a table,
With bnt_click i open a second activity es: CARICO that do something.
When i close the Activity CARICO, i want return to the first and refresh the table.
I try to call the sub that requery the table on the ORDER->Activity_Resume but don't run.
Thanks
 

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
Hi, i'm new.
i have the first activity es: ORDER with a table,
With bnt_click i open a second activity es: CARICO that do something.
When i close the Activity CARICO, i want return to the first and refresh the table.
I try to call the sub that requery the table on the ORDER->Activity_Resume but don't run.
Thanks
@Erel is correct, B4XPages will simplify your process.

But, to answer your question: When you call the second activity, the first activity is not "suspended" and waiting for a return from your second activity. The first activity ends and the second activity starts. When the second activity ends, there is no place to go back to in the first, it completely restarts the first activity.

The second activity would need to set or populate an object that the first activity could evaluate in Activity_Create/Activity_Resume and use it to update the information as needed.
 
Upvote 0

Massimo66

Member
i tried in debug and when the second activity ends, it doesn't go back to the first activity->btn_click nor go through resume.
Erel recommends switching to B4XPages.
In practice, once the second activity is finished, I should repopulate the table with the updated rows.
Thank you
 
Upvote 0
Top