Android Question Error while orientation is changed

Nitin Joshi

Active Member
Licensed User
My project includes B4XMainPage and RunActivity. I am using UDPSkt for the communication. APP automatically closes when i change the orientation when i am on B4XMainPage. I have attached error message
Following is the code added in sub B4XPage_Created.

B4XPage Created:
If UDPSkt.IsInitialized=False Then
        UDPSkt.Initialize("UDP",4211,255)
End If

Please note: I do not face error while I am in RunActivity.

Please help me how to solve this problem, thanks.
 

Attachments

  • Error Message when orientation is changed.txt
    4.1 KB · Views: 21

Nitin Joshi

Active Member
Licensed User
Erel, Thank you for the response. Earlier it was working fine. I mean, it supported orientation in old version.
By the way, Orientation works perfect for RunActivity page.
Meanwhile...Can u explain any other solution to support orientation as you have mentioned "with B4X pages, orientation must be locked". I mean, can i replace B4X main page with any other page? I think, this limitation (portrait or landscape) seems bottleneck for B4A.
 
Last edited:
Upvote 0

Nitin Joshi

Active Member
Licensed User
Thanks Erel. Let me go through tutorial.

By the way, I am sorry but i could not understand statement "You should then use a service for the network code."

And any plan to introuduce orientation option for B4XPages? As earlier it was supported...
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Nitin Joshi

Active Member
Licensed User
Dear Erel, My project includes 2 layouts. B4XMainPage opens opens first layout and RunActivity opens second layout.
Second layout which is loaded from RunActivity works fine in both (portrait and landscape) modes however first layout which is opened from B4XMain page throws the error.

Is there any solution that APP while in first layout (opened from B4XMainPage) will not change the orientation? means first layout will remained locked to portrait or landscape.

See, i would like to give flexibility to user to use any orientation. Generally, tab users will be comfortable in landscape and mobile user will be comfortable in portrait.

Appreciate your kind support.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…