Page view counter

How to detect Mobile devices like Pocket PC??

Last post 11-03-2008 8:38 AM by SKT_01. 14 replies.

Sort Posts:

  • How to detect Mobile devices like Pocket PC??

    06-07-2005, 4:11 AM
    • Loading...
    • SkySky
    • Joined on 04-27-2005, 3:28 AM
    • Posts 117
    • Points 244
    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.

    please help.
  • Re: How to detect Mobile devices like Pocket PC??

    06-16-2005, 5:23 PM
    • Loading...
    • Frank Tse
    • Joined on 06-11-2002, 12:53 PM
    • Posts 163
    • Points 830
    • AspNetTeam
    What about checking the capability "browser" = "Pocket IE" from the MobileCapabilities?
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: How to detect Mobile devices like Pocket PC??

    06-16-2005, 8:33 PM
    • Loading...
    • truelove
    • Joined on 11-21-2004, 4:31 AM
    • ChiZhou,AnHui, China
    • Posts 29
    • Points 145
    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

    _________________________________________________________________

    Pocket PC 2002   Pocket IE
    Openwave 7.0   Phone.com
    Internet Explorer   IE
    i from china!
    I can understand Chinglish only.
    Frankly speaking, the above sentence is translated by others.
  • Re: How to detect Mobile devices like Pocket PC??

    06-22-2005, 8:44 AM
    • Loading...
    • SkySky
    • Joined on 04-27-2005, 3:28 AM
    • Posts 117
    • Points 244
    Hi TrueLove,

    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??
  • Re: How to detect Mobile devices like Pocket PC??

    06-22-2005, 6:10 PM
    • Loading...
    • Frank Tse
    • Joined on 06-11-2002, 12:53 PM
    • Posts 163
    • Points 830
    • AspNetTeam
    Will the capabilities screenPixelsHeight and screenPixelsWidth help in this case?
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: How to detect Mobile devices like Pocket PC??

    06-22-2005, 8:52 PM
    • Loading...
    • truelove
    • Joined on 11-21-2004, 4:31 AM
    • ChiZhou,AnHui, China
    • Posts 29
    • Points 145
     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.
  • Re: How to detect Mobile devices like Pocket PC??

    09-09-2005, 5:41 AM
    • Loading...
    • ch0mik
    • Joined on 09-09-2005, 9:40 AM
    • Posts 1
    • Points 5
    better is :

    if browser.IsMobileDevice = true then ....

    w/Regards from Poland
    Pawel Janowski
    www.sunrise-tm.com
    www.koluszki.net


  • Wink [;)] Re: How to detect Mobile devices like Pocket PC??

    11-08-2005, 11:29 PM
    • Loading...
    • nanoBOSS
    • Joined on 11-09-2005, 4:27 AM
    • Posts 1
    • Points 5
    Hi ALL

    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
  • Re: How to detect Mobile devices like Pocket PC??

    11-12-2007, 7:22 PM
    • Loading...
    • WishStar99
    • Joined on 08-05-2006, 12:11 AM
    • VietNam
    • Posts 552
    • Points 1,862

    truelove, "what a hmm name" LOL

    thanks for the information that you posted above. your chinglish is very good. =)


     

    Aeries

    //---------------------------------------------//
    //------------------- ChloƩ ------------------//
    //---------------------------------------------//
  • Re: How to detect Mobile devices like Pocket PC??

    01-14-2008, 11:37 PM
    • Loading...
    • j_gaylord
    • Joined on 11-25-2002, 1:14 PM
    • Exeter, PA
    • Posts 728
    • Points 3,440
    • ASPInsiders
      TrustedFriends-MVPs

    nanoBOSS:
    Nope. That just handles desktop browsers. The answer is above.

    Jason N. Gaylord
    ASPInsider and Microsoft MVP
    http://jasongaylord.com
  • Re: How to detect Mobile devices like Pocket PC??

    07-10-2008, 2:07 AM
    • Loading...
    • davemanjra
    • Joined on 07-10-2008, 6:05 AM
    • Posts 2
    • Points 4

    or if you want to know more than just browser type, try using www.handsetdetection.com - it detects the mobile browser, then returns live results on screen size and device capabilities

  • Re: How to detect Mobile devices like Pocket PC??

    09-30-2008, 10:47 AM
  • Re: How to detect Mobile devices like Pocket PC??

    10-01-2008, 11:54 AM
    • Loading...
    • hc1
    • Joined on 02-06-2008, 2:08 PM
    • California
    • Posts 116
    • Points 111

    abwebsitedesign:

    How does Request.Browser["IsMobileDevice"] do its work?  The only information that the server has still has to come from the HTTP headers and they are retrieveable from Request.ServerVariables["ALL_RAW"].  How does it catch up with new browsers that come up after the .NET Framework has been released?

    I scanned through all the browsers that hit my web server, and it looks like all mobile browsers except one has a non-null x-wap-profile in Request.ServerVariables.  Testing for the presence of this would give a good indication that it is a phone browser.  The one exception is the iPhone.  It does not have this field.  The word "iPhone" is in the user agent field.  But it is still hardcoding.

    hc

  • Re: How to detect Mobile devices like Pocket PC??

    11-03-2008, 5:26 AM
    • Loading...
    • graphicguru
    • Joined on 11-03-2008, 10:16 AM
    • Posts 2
    • Points 4

    look at this asp code for mobile detection and redirections

    http://forums.asp.net/p/425321/2720548.aspx#2720548

  • Re: How to detect Mobile devices like Pocket PC??

    11-03-2008, 8:38 AM
    • Loading...
    • SKT_01
    • Joined on 04-17-2007, 5:31 AM
    • Germany
    • Posts 324
    • Points 1,429

    Hello,

    for my experience the best strategy to detect mobile devices and mobile browsers is to use the HttpBrowserCapabilities and extend the pre-defined capabilities of the .NET Framework with the actual devices and browsers. I use user agent strings and header information to determine which phone is requesting the page.

Page 1 of 1 (15 items)