jahlxx Posted February 10, 2023 Share Posted February 10, 2023 Hi all. In applications, in servermodule, in beforeinit procedure, I load some custom css. I have hybrid application. Is there any way to detect the device from I am calling the application, and if it is a mobile device con't load that css? Thanks. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted February 10, 2023 Share Posted February 10, 2023 1 hour ago, jahlxx said: Hi all. In applications, in servermodule, in beforeinit procedure, I load some custom css. I have hybrid application. Is there any way to detect the device from I am calling the application, and if it is a mobile device con't load that css? Thanks. Hi, "in servermodule, in beforeinit procedure" - You can't because this information is obtained from the device when the uniSession is created. when uniSession is created You can check device type via: If UniApplication.UniPlatform <> [upDesktop] then You can try to load mobile css in procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject); after check UniApplication.UniPlatform Quote Link to comment Share on other sites More sharing options...
jahlxx Posted February 13, 2023 Author Share Posted February 13, 2023 Ok. I'll try. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.