Other B4XPages - Single Orientation problem

LucaMs

Expert
Licensed User
Longtime User
I should develop an app which "must" have all "landscape pages" but a damned one in portrait mode.

This "portrait page" should receive messages from a server. If the app were sent to background and without a service, the messages would be lost.

Although I haven't tried it, I think the solution is relatively simple, having TWO "objects" for this functionality: a B4XPages that will always receive all messages and pass them to the Activity, which will display them by reading them from inside its Activity_Resume (too many "them" ?).

This post is both to ask for confirmation that it is a decent solution and to suggest "the" solution in cases like this.
 

LucaMs

Expert
Licensed User
Longtime User
Thanks, Erel.

The fact that I could have more Activities, some with B4XPages and others not, and Activities with different orientations, "fortunately" I knew.

What I meant is that I couldn't just add an Activity with a different orientation than the one with the B4XPages in this case because, if the app was send to background, the Activity would lose any messages sent by a server, while using a "pair B4XPage + Activity ", I can solve the problem (the B4XPage will receive the messages, the Activity will show them).
 
Upvote 0
Top