Android Question is posible to update activity while viewing in recent apps list

albertor21

New Member
I have an activity that display sensible info for a limited period of time. I' ve implemented by using a timer and works ok, except in a situation:
If I get the recent apps (leftmost button on my galaxy S9) while my activity was showing the info, every time i return to the recent apps ( list my sensible info is there
Is there any way to update you activity preview while is in that state?
 

agraham

Expert
Licensed User
Longtime User
I think you missed the point Erel :(

If I understand the 'problem' correctly he wants to update the preview of the activity in the recent apps page on the device. B4XPages will let the app update in the background in response to events but as far as I know there is no way to change the saved preview image in recent apps.
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
Banking apps display a screensaver.
I would do it like this:
In the event "B4XPage_Disappear" show a panel that covers the whole screen and hide it in the "B4XPage_Appear" event.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
In the event "B4XPage_Disappear" show a panel that covers the whole screen and hide it in the "B4XPage_Appear" even
I think you too have missed the point. If I understand correctly he wants to update the preview image in recent apps, which might be showing stale information, without the user bringing the app to the foreground. This is not possible.
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
I think the point is exactly right.
He displays sensitive data and puts the app in the background. So just show a panel which covers the screen, then the preview image should only contain this panel?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
He displays sensitive data and puts the app in the background. So just show a panel which covers the screen, then the preview image should only contain this panel?
The question is WHEN exactly does Android create the Preview? Before the app goes to background or after. In the last one the preview does not show this panel as you can not change a layout when in background. Showing a panel in the B4XPage_Disappear will not have any effect i guess.

In my understanding B4XPage_Disappear will be raised when the app already is (no longer visible on screen) in the background.
I did not tested it though.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
I think the point is exactly right.
Only the OP can answer but my interpretation is
I have an activity that display sensible info for a limited period of time.
But it seems he wants to alter the data when it goes stale, which he does by a timer when the app is running. When it is in the background it shows a frozen image of the data in recent apps and he wants to change that image when the data is stale which is not possible.
 
Upvote 0

albertor21

New Member
Sorry for not answering b4 . :)

I think you missed the point Erel :(

Agraham, you were right from the beginning. the problem is with the preview.
If there is no way to update this preview then there is no solution for my problem even if I hide the info in the B4XPage_Disappear event or any other event that ocurr after closing the view of the app (activity_pause).
As long as the preview is a snapshot of the app when the sensible information is being shown there is no way to hide it

Thanks for the discussion anyway and for your help in my first question in this forum
I'm getting in love with b4a
 
Upvote 0
Top