Forums

 
ForumForumMainstream Foru...Mainstream Foru...BugsBugsBeta2 - isMobile doesnBeta2 - isMobile doesn't seem to detect mobiles...
Previous Previous
 
Next Next
New Post
 1/7/2008 12:03 PM
 
 Modified By Simon Probert  on 1/7/2008 12:05:33 PM
I just added

Is mobile? <%= !this.IsMobile %>

In my login page and as expected it prints False if you look at it with a browser... However If you point a phone at it it also prints False so something is akimbo here...

As a result it doesn't load the mobile theme when you use a mobile device

Do you have any more information so we can debug this?



New Post
 1/7/2008 12:57 PM
 
We are using the .NET methods to determine if the browser is on a mobile phone.  Try to also dump Request.Browser.Capabilities["isMobileDevice"].  I suspect that it is also returning false.
New Post
 1/8/2008 4:32 AM
 

Your suspicions are confirmed.

Request.Browser.Capabilities["isMobileDevice"] returns false for IE6, Mozilla and Safari

IE packed with Windows Mobile 5 it also returns false
IE packed with Windows Mobile 6 Professional also returns false

Will test on my blackberry in a minute

Note I'm running windows authentication off

 

New Post
 1/8/2008 4:44 AM
 
 Modified By Simon Probert  on 1/8/2008 5:08:27 AM

Note: I just stick the following in my login/loginview.ascx

User Agent:<b><%= Request.UserAgent %></b><br />
Browser:<b><%= Request.Browser.Browser %></b><br
/>
Version:<b><%= Request.Browser.Version %></b><br
/>
IsMobile?:<b><%= this.IsMobile %></b><br
/>
isMobileDevice?:<b><%= Request.Browser.Capabilities["isMobileDevice"] %></b><br />

To get the scoop - for example the old ipaq returns

User Agent: HPiPAQhw6900/1.0/Mozilla/4.0(compatible; MSIE 4.01;Windows CE; PPC; 240x240)
Browser:
Mozilla
Version:
4.0
IsMobile?:
False
isMobileDevice?:false

And the other thing returns:

User Agent: Xda Orbit; 240x320(compatible; MSIE 6.0;Windows CE; IEMobile 6.12)
Browser:
Unknown
Version:
0.0
IsMobile?:
False
isMobileDevice?:false

And the Sony Ericson 900 Cybershot returns:

User Agent: Mozilla/5.0 (x11; u; linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 MG (Novara-Vision/6.1)
Browser:Firefox

Version:1.5.0.7

IsMobile?:
False
isMobileDevice?:false

Still haven't done the blackberry - sometghing wrong with my edge connection :-(

 

New Post
 1/8/2008 9:45 AM
 

I'm surprised that your iPAQ is not working.  Ours is working just fine, so is our Motorola Q.  Our iPAQ is only a year old, so that might explain things.

In any case, it would seem that we have to write our own mobile detection code.  If you can spare the time, please do a little of the research for us and point is to some good documentation on how to detect a mobile browser.

Previous Previous
 
Next Next
ForumForumMainstream Foru...Mainstream Foru...BugsBugsBeta2 - isMobile doesnBeta2 - isMobile doesn't seem to detect mobiles...