Jump to content

Hybrid Application - Desktop Form - Test For Mobile - Mobile Form


Recommended Posts

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.

Link to post
Share on other sites

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. 

  • Upvote 1
Link to post
Share on other sites

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.

Link to post
Share on other sites

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

Link to post
Share on other sites

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.

Link to post
Share on other sites
  • 5 weeks later...

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
Link to post
Share on other sites
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...