NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on April 14, 2017, 05:47:49 AM

Title: Mobile on Desktop
Post by: Alberto on April 14, 2017, 05:47:49 AM
Bruce, when I set the Wehandler to Detect the NT server, it detects if its a mobile or not.
I need to set it to Desktop (Mobile mode is really working weird) and change my app depending on IsMobile or not.
HOw can I use the Detect of NT beeing in Desktop mode?
Thanks

(NT8.71)
Title: Re: Mobile on Desktop
Post by: Bruce on April 15, 2017, 10:43:21 PM
Hi Alberto,

I'm not sure I understand the question...
The obvious answer is that in WebHandler you set it to Desktop mode...
But I think I'm missing what you are really asking...

cheers
Bruce
Title: Re: Mobile on Desktop
Post by: Alberto on April 16, 2017, 07:10:11 AM
If you set Webhandler as Desktop then Ismobile is allways 0 (false)
I need, beeing in desktop mode, to know if the app is opened with a mobile device, a function like IsMobile something like OpenInMobile(), may be the same code used in IsMobile replicated in another function.

In the Login proc, may I call

p_web._SetMobile()

then set a session value

p_web.ssv('OpenInMobile',p_web.Ismobile())

and set it back to Desktop

p_web.Ismobile()=false

Then beeing in desktop mode, I can use the new session value to modify my forms/browses for mobile devices?
Title: Re: Mobile on Desktop
Post by: Alberto on April 17, 2017, 09:38:12 AM
I think its solved:

p_web.IsMobile PROCEDURE

ReturnValue          Long,AUTO

 CODE
  ReturnValue = PARENT.IsMobile()
  !*****ADDED*****
  p_web.ssv('IsMobile',ReturnValue)
  ReturnValue=0