NetTalk Central

Author Topic: Mobile on Desktop  (Read 3935 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Mobile on Desktop
« 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)
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Mobile on Desktop
« Reply #1 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

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Mobile on Desktop
« Reply #2 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?
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Mobile on Desktop
« Reply #3 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
-----------
Regards
Alberto