andyhill Posted October 11, 2017 Share Posted October 11, 2017 I want to build a Hybrid Application and use a Desktop Form to Login (request an account if necessary) then once logged in test if Desktop or Mobile and show the appropriate Desktop or Mobile form - please advise how to analyse users platform - Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 12, 2017 Share Posted October 12, 2017 Hi, UniServerModule -> Options -> soAutoPlatformSwitch = True Best regards, Quote Link to comment Share on other sites More sharing options...
andyhill Posted October 12, 2017 Author Share Posted October 12, 2017 So how will uniGUI know to show fmPage instead of fPage when after they have successfully logged in I execute fPage.ShowModal ? Quote Link to comment Share on other sites More sharing options...
mhmda Posted October 12, 2017 Share Posted October 12, 2017 It's all handled internally by the framework: when client connects using desktop, unigui will display the login form for desktop and after login it will display the mainform for desktop and the same for client who connects from mobile device such tablet/smartphone. 1 Quote Link to comment Share on other sites More sharing options...
andyhill Posted October 12, 2017 Author Share Posted October 12, 2017 Thanks, but as mentioned above, I want to use Desktop Forms for both Login and New Accounts on both platforms, however when it comes to other forms I would want to check which platform and call either Desktop or Mobile forms accordingly (with mobile I will want to check for SmartPhone or Tablet). So back to my last question, how can uniGUI tell me in code to show fmPage (Mobile) instead of fPage (Desktop) after they have successfully logged in when I would normally execute fPage.ShowModal ? I would need to know in advance whether to execute fPage.ShowModal -or- fmPage.ShowModal. Quote Link to comment Share on other sites More sharing options...
mhmda Posted October 12, 2017 Share Posted October 12, 2017 It doesn't make any sense..... You should implement it as the framework suggests. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 12, 2017 Share Posted October 12, 2017 Hi, At the moment you can not do this Quote Link to comment Share on other sites More sharing options...
bbosnjak Posted October 12, 2017 Share Posted October 12, 2017 Here's an idea. If you want a desktop login/create form, then just create desktop versions (Login.dfm and NewAccount.dfm). If the framework doesn't find a Loginm.dfm it'll show the Login.dfm on both desktop and mobile. After successful login, the framework will automatically chose Main.dfm for desktop and Mainm.dfm for mobile, do here create both a desktop and a mobile version of Main. Given you likely want different sets of forms/features/workflows between desktop and mobile, from Main you would only show "fPage" forms, and from Mainm you would only show "fmPage" forms. Here you're in complete control of whether you next display a mobile or desktop form. As for the mobile Mainm, if using layouts doesn't allow for phone/tablet/landscape/portrait layouts, you can use Mainm as a container and within Mainm decide which form/control you want to load into it. Or in Mainm immediately show a phone vs tablet form modally (so that Mainm is never really visible, it's always another form that the user actually sees. Perhaps create a simple proof-of-concept project (empty forms with just a label to identify it and a button to do the next action) to test out these ideas and see how it works. Sent from my SM-P900 using Tapatalk Quote Link to comment Share on other sites More sharing options...
andyhill Posted October 12, 2017 Author Share Posted October 12, 2017 Thank you, I will experiment shortly Quote Link to comment Share on other sites More sharing options...
andyhill Posted October 14, 2017 Author Share Posted October 14, 2017 Testing showed irregular results. If my Mobile Form contains a TUnimDBListGrid then the application crashes every where (slider issues). If I have separate Login and Main etc. for both Desktop and Mobile then TUnimDBListGrid works. Cannot go from Desktop Login to Mobile Form with TUnimDBListGrid. Quote Link to comment Share on other sites More sharing options...
mhmda Posted October 14, 2017 Share Posted October 14, 2017 Could you create a test case Quote Link to comment Share on other sites More sharing options...
davidizadar Posted October 14, 2017 Share Posted October 14, 2017 Andy, Did you try the included demo Small Hybrid App? You can find it under Demos\Touch This particular demo uses grids for desktop and mobile. Quote Link to comment Share on other sites More sharing options...
andyhill Posted October 17, 2017 Author Share Posted October 17, 2017 I have given up sharing some forms across desktop and mobile, I now have separate forms for each - less issues. Quote Link to comment Share on other sites More sharing options...
deljavan Posted November 15, 2017 Share Posted November 15, 2017 It's all handled internally by the framework: when client connects using desktop, unigui will display the login form for desktop and after login it will display the mainform for desktop and the same for client who connects from mobile device such tablet/smartphone. What is the difference between the login form and the original form. The login form will be displayed before all forms Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 15, 2017 Share Posted November 15, 2017 Hi, Yes, it will be the first form displayed when a Web session starts http://www.unigui.com/doc/online_help/login-form.htm Quote Link to comment Share on other sites More sharing options...
bsu75 Posted September 20, 2019 Share Posted September 20, 2019 when pass parameter to mobile, "m/" must be included for mobile. Example, Mobile use http://localhost:8077/m/?id=123 Is there a way to use "http://localhost:8077/?id=123" for both desktop and mobile? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 20, 2019 Share Posted September 20, 2019 Hello, Can you please specify, which edition and build of UniGUI are you using? Quote Link to comment Share on other sites More sharing options...
bsu75 Posted September 23, 2019 Share Posted September 23, 2019 Version:1.70.0 build 1485 thank you. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 23, 2019 Share Posted September 23, 2019 1 hour ago, bsu75 said: Version:1.70.0 build 1485 Hello, Are you using a trial edition? Quote Link to comment Share on other sites More sharing options...
bsu75 Posted September 23, 2019 Share Posted September 23, 2019 yes for testing. license one has no this problem? i will try it. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 23, 2019 Share Posted September 23, 2019 21 minutes ago, bsu75 said: yes for testing. Please use the latest trial version. 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.