Hello,
How can I make the WebView persistant during device orientation?
I am trying to create a wrapper that will open a web page and allow the viewer to navigate through the website. I have created this Appsgeyser and App Inventor and they both work well but have their branding on the Android app.
I turned to B4A and have created the basics using the WebView. It navigates to the URL when the app is started and I can navigate through the website as expected. It seemed so simple and easy. BUT, each time the device orientation is changed the WebView reloads the original URL.
Is the any way to make the current URL in the WebView persistent even through device orientation? I have tried using WebViewExtras and StateManager but have been unable to find a solution.
I have searched the Forum and cannot find anything that addresses this except a post suggesting that the orientation be set fixed to either portrait or landscape. This fixes the issue but is not an acceptable solution for my purpose.
I understand the life cycle of the app but is there truly no way to do this in B4A? It appears that it is possible in Android since both of the other solutions work as expected. Does B4A always have to recreate all resources on device orientation change? Is there any way around this for my situation?
Any direction or help will be appreciated. BTW, this is fantastic work and a very usefull tool. Congrats to all involved in this project.
I have uploaded my test files, hope it helps.
How can I make the WebView persistant during device orientation?
I am trying to create a wrapper that will open a web page and allow the viewer to navigate through the website. I have created this Appsgeyser and App Inventor and they both work well but have their branding on the Android app.
I turned to B4A and have created the basics using the WebView. It navigates to the URL when the app is started and I can navigate through the website as expected. It seemed so simple and easy. BUT, each time the device orientation is changed the WebView reloads the original URL.
Is the any way to make the current URL in the WebView persistent even through device orientation? I have tried using WebViewExtras and StateManager but have been unable to find a solution.
I have searched the Forum and cannot find anything that addresses this except a post suggesting that the orientation be set fixed to either portrait or landscape. This fixes the issue but is not an acceptable solution for my purpose.
I understand the life cycle of the app but is there truly no way to do this in B4A? It appears that it is possible in Android since both of the other solutions work as expected. Does B4A always have to recreate all resources on device orientation change? Is there any way around this for my situation?
Any direction or help will be appreciated. BTW, this is fantastic work and a very usefull tool. Congrats to all involved in this project.
I have uploaded my test files, hope it helps.