1 / 12

Coding for Mobile

Coding for Mobile. Week 13 TCNJ Web 2 Jean Chu. Web is Dead. Long live the Internet. http://www.wired.com/magazine/2010/08/ff_webrip/all/1. http://www.wired.com/magazine/2010/08/ff_webrip/all/1. Coding Web for Mobile. Mobile Specific Meta Tags.

carter
Download Presentation

Coding for Mobile

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Coding for Mobile Week 13 TCNJ Web 2 Jean Chu

  2. Web is Dead. Long live the Internet http://www.wired.com/magazine/2010/08/ff_webrip/all/1

  3. http://www.wired.com/magazine/2010/08/ff_webrip/all/1

  4. Coding Web for Mobile

  5. Mobile Specific Meta Tags <meta name = "viewport" content = "width = device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;" /> <meta name="HandheldFriendly" content="True" />

  6. Detect the browser and redirect Detect the Browser <?php $_SERVER[‘HTTP_USER_AGENT’]; ?> Redirect to the mobile page <?phpheader('Location: http://www.example.com/'); ?>

  7. Detect the browser and redirect- Easy Way to Use a library http://www.detectmobilebrowsers.mobi/ require_once('mobile_device_detect.php'); $mobile =mobile_device_detect(true,false,true,true,true,true,true,'http://www.domain-name.com/m/',false);

  8. Extra : Click to Call Mobile <a href="tel:555-555-5555">555-555-5555</a>

  9. Validating Code • http://validator.w3.org/mobile/

  10. Simulators • iphone • http://testiphone.com/ • Blackberry • http://us.blackberry.com/developers/resources/simulators.jsp • Android • http://developer.android.com/sdk/index.html

  11. Using jQuery Mobile (alpha version yet) BUILD Mobile Web / APP USING jQUERY MOBILE

  12. jQuery Mobile • It is Alpha Version so far (Not even Beta) • http://jquerymobile.com/ • http://jquerymobile.com/demos/1.1.0/ • HTML5 markup-driven • Supports Mobile only events (Tap, Swipe, etc)

More Related