50. A simple change of style from media=„screen“ to media=„handheld“ is all you need to do to agically mobilize your site, right? WRONG! Mobile Website Development from ScratchFH Hagenberg, 6. März 2010
58. Screen Resolution Android iPhone/iPod touch Blackberry Windows mobile QVGA: 320 x 240 HVGA: 480 x 320 (WVGA:ca. 854x480) QVGA: 320 x 240 Unbek.: 400 x 240 HiRes: 320 x 320 VGA: 640 x 480 WVGA: 800 x 480 Kleiner: mehrere QVGA: 320 x 240 HVGA: 480 x 320 Unbek.: mehrere HVGA: 480 x 320 Mobile Website Development from ScratchFH Hagenberg, 6. März 2010
103. Fertige Klassen kapseln Logik für User Agent AuswertungMobile Website Development from ScratchFH Hagenberg, 6. März 2010
104.
105. Verfügbar für: Java, ASP.NET, PHP, JavaScript//1. Instantiate the object to do our testing with.<%@page import="com.handinteractive.mobile.UAgentInfo"%> <% //2. Initialize the browser info variables String userAgent = request.getHeader("User-Agent"); String httpAccept = request.getHeader("Accept"); //3. Create the UAgentInfo object UAgentInfo detector = new UAgentInfo(userAgent, httpAccept); //4. Detect whether the visitor is using a mobile device. // For example, if it's an iPhone, redirect them to the // iPhone-optimized version of your web site. if (detector.detectIphoneOrIpod()) { response.sendRedirect("http://www.mycompany.com/iphone"); } else { response.sendRedirect("http://www.mycompany.com/default"); } %> Mobile Website Development from ScratchFH Hagenberg, 6. März 2010