Jump to content

Do you have any code that tells me if the running APP is Mobile or Web?


Fábio Matte

Recommended Posts

Hello,
 
Do you have any code that tells me if the running APP is Mobile or Web?
 
For example:
 
If it is mobile, it creates a UnimLabel1 at runtime, if Web creates a UniLabel1 at runtime.
 
Something like this, but to differentiate Mobile from Web:
   {$ IFDEF RELEASE}
     {$ define UNIGUI_DLL} // Generates DLL directive
    // {$ define UNIGUI_SERVICE} // Service Policy
   {$ ENDIF}
  {$IFDEF DEBUG}
    {$define UNIGUI_VCL} //
  {$ENDIF}


  {$IFDEF UNIGUI_VCL}
    program {$E exe}
  {$ENDIF}


  {$IFDEF UNIGUI_DLL}
    library {$E dll}
  {$ENDIF}


  {$IFDEF UNIGUI_SERVICE}
    program
  {$ENDIF}

 

Link to comment
Share on other sites

When running a hybrid application, you have two mainforms,

one for each platform, and only one of them will be created and shown.

 

So in onShow you can have code which controls the flow of the app,

like for instance skipping login if a url parameter is used, and 

then hide the mainform and going to another form etc.

 

Like if the user clicks on an email confirmation link,

you can redirect to a confirmation page, by skipping login

in the beforeLogin event if a url parameter is used.

 

You can do the skipping login by really logging in as an

anon user with no rights, which may change if the user

later chooses to log in.

  • Upvote 1
Link to comment
Share on other sites

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...