Run Web App maximized (fill browser window) by default?

There is a feature for "maximizing" the web app window inside the browser:
Capture.PNG
Is there a way to have the apps run in "full browser size" mode by default, rather than the client having to click the maximize button?

10 Comments

Same thing here would love to have an answer
set(app.UIFigure,'WindowState','maximized');
There is also a fullscreen option
Thanks but as of 2019b, the windowstate has no effect on the web app window.
That is strange. I have used this in R2019b and it works for me.
I put this in the startupFcn.
If you continue have this issues, try to install the latest updates for R2019b, perhaps this was a bug that is fixed.
@Mohammad, are you referring to web apps specifically? Or running the app within the Matlab environment? I noticed that the html container in each case appear to be different, so I'm not sure if the "windowstate" property exists or has the same behavior for the web apps container...
But, admittledly I do not do minor version updates so my experience is limited to R2019b rev 0 and hopefully it is moot going forwad. It would be nice to get TMW staff input here, but it doesn't appear as a fixed bug listed here: https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/updates/r2019b/r2019b-updates-release-notes.pdf
I have 2020a now, but won't be able to test the web apps for a while until I update my web app server. I'll try to remember to update this question when I am able to test with 2020a.
I have Matlab R2019b fully updated version.
This command works only when you run the app within the matlab environment. When you lauch the webapp the command doesn't work.
Does anyone solve this issue?
I haven't had a chance to update our web server to 2020a, and at this point am planning to wait for 2020b, so I haven't had any more chance to explore.
Confirming that with 2020b, neither the "maximized" nor "fullscreen" setting for "WindowState" of the app.UIFigure seems to have an effect on the web app.
Have you already solve this issue or there is still no way how to start web app in maximized mode by default?
(+1) I would also like to have the option to launch the Matlab WebApp Server applications "maximized" in the browser window. This doesn't seem to work currently, as of version R2021b. I tested it inside the startupFcn, at the top:
function startupFcn(app)
if isdeployed
app.UIFigure.WindowState = "maximized";
end
% [ ... ] "snip"
end

Sign in to comment.

 Accepted Answer

Suresh Balakrishnama
Suresh Balakrishnama on 28 Feb 2023
Moved: Voss on 28 Feb 2023
Yes, we have solved this. https://www.mathworks.com/help/webappserver/ref/webappsconfig.html, please see the webapps-config app_session_fullscreen configuration setting.

6 Comments

Does this configuration setting exist for the development version of the web app server as well?
Hello Hannes - unfortunately no, this setting is available only in the product version of MATLAB Web App Server ( https://www.mathworks.com/products/matlab-web-app-server.html )
I haven't checked if this works for me - I don't have current version set up and don't have near term plans to do so. However, I will accept this answer assuming the best.
For me, running windowstate maximized does also not work in Matlab online (but of course it works fine in the regular Matlab environment). Any idea? Setting the window width and height to 100% does not do proper full screen.
See the solution provided by Solam below if you are running the development version of the web app server. This solution worked perfectly for me. Good luck!
Maybe I have misunderstood the solution from Suresh.
Could we have the option to set the windows to maximize at the webapp level itself and not at the wabapp server? We do not want necessarly that all webapps open fullscreen.
Thank you.

Sign in to comment.

More Answers (1)

Solam
Solam on 19 Sep 2023
Edited: Solam on 19 Sep 2023
For the development version of the web app server there is a solution to do this.
1 - Open this file : C:\ProgramData\MathWorks\webapps\R2023a\config\webapps.config
2 - Set this line like this :
3 - Restart the Web App Server

Categories

Find more on MATLAB Web App Server in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!