Hi all,
Need help on this. As you know there is PDA-phone like Pocket PC-phone run on Window Mobile 2003 and above. It has Ms Internet Explorer of scale down version.
So, the question is this kind of device is under mobile device category but having IE browser. So, how to detect this kind of MObile device using MobileCapabilities class? YOu see, SmartPhone also have Ms IE browser. How to tell them apart?? If I serve Pda-html
website to SmartPhone, its screen size will be too small for it.
My objective is this : to detect the PDA device and Mobile Phone .
If it is PocketPC-phone, I will serve PDA-html website or Mobile web base on customer selection.
If it is smartphone or WAP 2.0 -base mobile phone, I will serve Mobile Web.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Dim Browser_obj As System.Web.Mobile.MobileCapabilities = CType(Request.Browser, System.Web.Mobile.MobileCapabilities)
If Browser_obj.Browser = "Pocket IE" Then
Label1.Text = "the is Pocket PC"
ElseIf Browser_obj.Browser = "IE" Then
Label1.Text = "Microsoft Internet Explorer"
ElseIf Browser_obj.Browser = "Phone.com" Then
Label1.Text = "the is Openwave"
End If
End If
End Sub
1. Smart phone and PDA-phone both share the same PocketPC internet explorer.
So, base on your code, you can not tell which one is smart phone and which one is PDA-phone!! My objective is that if I detect a PDA-phone, then I will direct the user to Mobile Page which has bigger Page for bigger screen size.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Dim browser As System.Web.Mobile.MobileCapabilities = CType(Request.Browser, System.Web.Mobile.MobileCapabilities)
If browser.ScreenCharactersWidth < 20 Then
Label1.Text = "short text message"
Else
Label1.Text = "long text message"
End If
End If
End Sub
My English is very poor ,Maybe I can't express my meaning exactly.
Notice:20 is Characters Width in line
Openwave 7.0 only has 19 Characters
you can test browser.screencharacterswidth value for you Smart phone and you PDA-phone
i from china!
I can understand Chinglish only.
Frankly speaking, the above sentence is translated by others.
SkySky
Member
265 Points
177 Posts
How to detect Mobile devices like Pocket PC??
Jun 07, 2005 08:11 AM|LINK
Need help on this. As you know there is PDA-phone like Pocket PC-phone run on Window Mobile 2003 and above. It has Ms Internet Explorer of scale down version.
So, the question is this kind of device is under mobile device category but having IE browser. So, how to detect this kind of MObile device using MobileCapabilities class? YOu see, SmartPhone also have Ms IE browser. How to tell them apart?? If I serve Pda-html website to SmartPhone, its screen size will be too small for it.
My objective is this : to detect the PDA device and Mobile Phone .
If it is PocketPC-phone, I will serve PDA-html website or Mobile web base on customer selection.
If it is smartphone or WAP 2.0 -base mobile phone, I will serve Mobile Web.
please help.
Frank Tse
Participant
830 Points
163 Posts
Microsoft
Re: How to detect Mobile devices like Pocket PC??
Jun 16, 2005 09:23 PM|LINK
truelove
Member
145 Points
29 Posts
Re: How to detect Mobile devices like Pocket PC??
Jun 17, 2005 12:33 AM|LINK
If Not IsPostBack Then
Dim Browser_obj As System.Web.Mobile.MobileCapabilities = CType(Request.Browser, System.Web.Mobile.MobileCapabilities)
If Browser_obj.Browser = "Pocket IE" Then
Label1.Text = "the is Pocket PC"
ElseIf Browser_obj.Browser = "IE" Then
Label1.Text = "Microsoft Internet Explorer"
ElseIf Browser_obj.Browser = "Phone.com" Then
Label1.Text = "the is Openwave"
End If
End If
End Sub
_________________________________________________________________
Pocket PC 2002 Pocket IE
Openwave 7.0 Phone.com
Internet Explorer IE
I can understand Chinglish only.
Frankly speaking, the above sentence is translated by others.
SkySky
Member
265 Points
177 Posts
Re: How to detect Mobile devices like Pocket PC??
Jun 22, 2005 12:44 PM|LINK
I forgot to ask you this question:
1. Smart phone and PDA-phone both share the same PocketPC internet explorer.
So, base on your code, you can not tell which one is smart phone and which one is PDA-phone!! My objective is that if I detect a PDA-phone, then I will direct the user to Mobile Page which has bigger Page for bigger screen size.
Can you help on this??
Frank Tse
Participant
830 Points
163 Posts
Microsoft
Re: How to detect Mobile devices like Pocket PC??
Jun 22, 2005 10:10 PM|LINK
truelove
Member
145 Points
29 Posts
Re: How to detect Mobile devices like Pocket PC??
Jun 23, 2005 12:52 AM|LINK
If Not IsPostBack Then
Dim browser As System.Web.Mobile.MobileCapabilities = CType(Request.Browser, System.Web.Mobile.MobileCapabilities)
If browser.ScreenCharactersWidth < 20 Then
Label1.Text = "short text message"
Else
Label1.Text = "long text message"
End If
End If
End Sub
My English is very poor ,Maybe I can't express my meaning exactly.
Notice:20 is Characters Width in line
Openwave 7.0 only has 19 Characters
you can test browser.screencharacterswidth value for you Smart phone and you PDA-phone
I can understand Chinglish only.
Frankly speaking, the above sentence is translated by others.
ch0mik
Member
5 Points
1 Post
Re: How to detect Mobile devices like Pocket PC??
Sep 09, 2005 09:41 AM|LINK
if browser.IsMobileDevice = true then ....
w/Regards from Poland
Pawel Janowski
www.sunrise-tm.com
www.koluszki.net
nanoBOSS
Member
5 Points
1 Post
Re: How to detect Mobile devices like Pocket PC??
Nov 09, 2005 03:29 AM|LINK
I Believe what you need is in this site
http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
THE ULTIMATE BROWSER SNIFFER
Greetings from PORTUGAL
WishStar99
Contributor
2842 Points
865 Posts
Re: How to detect Mobile devices like Pocket PC??
Nov 12, 2007 11:22 PM|LINK
truelove, "what a hmm name" LOL
thanks for the information that you posted above. your chinglish is very good. =)
Aeries
j_gaylord
Contributor
3444 Points
731 Posts
ASPInsiders
MVP
Re: How to detect Mobile devices like Pocket PC??
Jan 15, 2008 03:37 AM|LINK
ASPInsider and Microsoft MVP
http://jasongaylord.com