Android Question B4XPage_Appear or B4XPage_Foreground

Chris2

Active Member
Licensed User
Longtime User
In particular with reference to B4A apps, can someone please explain to me the difference between the B4XPage_Appear & B4XPage_Foreground events?
And between the B4XPage_Disappear and B4XPage_Background events?

Put another way, on an android phone what's the difference between appearing and moving to the foreground, and between disappearing and moving to the background?

Many thanks as always.
 
Solution
Implement the relevant events and add:
B4X:
B4XPages.GetManager.LogEvents = True

You will quickly see that they are quite different from each other.

Appear - raised when a page becomes visible.
Foreground - raised when the app comes to the foreground. This will be raised on all pages that implement this event.

Disappear and Background are the other direction of these events.

Erel

B4X founder
Staff member
Licensed User
Longtime User
Implement the relevant events and add:
B4X:
B4XPages.GetManager.LogEvents = True

You will quickly see that they are quite different from each other.

Appear - raised when a page becomes visible.
Foreground - raised when the app comes to the foreground. This will be raised on all pages that implement this event.

Disappear and Background are the other direction of these events.
 
Upvote 0
Solution

Chris2

Active Member
Licensed User
Longtime User
Implement the relevant events and add:
B4X:
B4XPages.GetManager.LogEvents = True
You mean uncomment the line that is handily already present in the B4XPages app template :).

I'll do as you suggest, although having re-read the descriptions I may have spotted the significant difference:
Appear - raised when a page becomes visible.
Foreground - raised when the app comes to the foreground. This will be raised on all pages that implement this event.
 
Upvote 0
Top