{"id":18,"date":"2013-06-02T13:57:43","date_gmt":"2013-06-02T13:57:43","guid":{"rendered":"http:\/\/thomasgr.im\/shares\/?p=18"},"modified":"2013-08-11T10:28:04","modified_gmt":"2013-08-11T10:28:04","slug":"making-app-with-phonegap-jqm-part-1-simple-html5-skeleton","status":"publish","type":"post","link":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/","title":{"rendered":"Making An App With PhoneGap &#038; jQm Part I: A Simple HTML5 Skeleton"},"content":{"rendered":"<p>In this series, I will explain how I am using <a href=\"http:\/\/phonegap.com\/\" target=\"_blank\">PhoneGap<\/a> &#038; <a href=\"http:\/\/jquerymobile.com\/\" target=\"_blank\">jQuery.Mobile<\/a> (on top of <a href=\"http:\/\/jquery.com\/\" target=\"_blank\">jQuery<\/a>) to build an App for Android while being able to test it in my desktop browser.&nbsp;This is not an introduction on PhoneGap or jQuery.Mobile per se.&nbsp;I will <strong>not<\/strong> focus on Java and I won&#8217;t explain how to install PhoneGap or build the app from an <abbr title=\"Integrated Development Environment\">IDE<\/abbr> like Eclipse; you may need to <a href=\"http:\/\/www.adobe.com\/devnet\/html5\/articles\/getting-started-with-phonegap-in-eclipse-for-android.html\" title=\"Classic tutorial on how to install PhoneGap and make it work with Eclipse for Android\" target=\"_blank\">read some other tutorial<\/a> first to cover those points and then come back to this page when you can build your app from your IDE.&nbsp;Don&#8217;t worry too much though, you won&#8217;t need much knowledge of Java for I will expose some ways we can use to test the app in a desktop browser without the need to recompile it everytime we change something.<\/p>\n<p>Now this is my first app, which means that most of the code I&#8217;ve put in so far required some trial-and-error for it to work.&nbsp;Hopefully you&#8217;ll find (parts of) this tutorial useful and you&#8217;ll be able to code your way faster than me!<\/p>\n<p><u>Note:<\/u> I wouldn&#8217;t dare pretending my code is perfect, and for the very same reason it&#8217;s my first app there are most certainly better ways of doing some things; if you have any question or remark concerning my code, please <strong>do not hesitate to leave a comment<\/strong>, that&#8217;s the best way for everyone to improve their skills.<\/p>\n<h2>Table of Contents<\/h2>\n<p>Here is how the tutorial is split:<\/p>\n<dl>\n<dt>Part I: A Simple <abbr title=\"HyperText Markup Language\">HTML<\/abbr>5 Skeleton<\/dt>\n<dd>HTML5 basic structure, resources order, multiple pages and a menu with icons<\/dd>\n<dt><a href=\"http:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-2-loading-javascript-properly\/\" title=\"Making An App With PhoneGap &#038; jQm Part II: Loading JavaScript Properly\">Part II: Loading JavaScript The Right Way<\/a><\/dt>\n<dd>JavaScript load order, jqm settings, App.init() &#038; execution levels<\/dd>\n<dt><a href=\"http:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-3-stateless-authentication-layer\/\" title=\"Making An App With PhoneGap &#038; jQm Part III: A Stateless Authentication Layer\">Part III: A Stateless Authentication Layer<\/a><\/dt>\n<dd><abbr title=\"REpresentational State Transfer\">REST<\/abbr> concepts, public\/private tokens, some <abbr title=\"PHP: Hypertext Preprocessor\">PHP<\/abbr> server code<\/dd>\n<dt>Part IV: ?<\/dt>\n<dd>I&#8217;m not there yet!<\/dd>\n<\/dl>\n<h2 id=\"html5-skeleton\">Let&#8217;s Start With a (Very) Basic HTML5 Template<\/h2>\n<p><!--more--><br \/>\nHere&#8217;s the basis for all the code we&#8217;ll put in <kbd>index.html<\/kbd>.&nbsp;As you probably know, the HTML, <abbr title=\"Cascading StyleSheets\">CSS<\/abbr> &#038; <abbr title=\"JavaScript\">JS<\/abbr> code we&#8217;ll write in <kbd>\/assets\/www<\/kbd> will be loaded and executed by a <strong>modern<\/strong> browser like <a href=\"http:\/\/www.google.com\/intl\/en\/chrome\/browser\/mobile\/\" target=\"_blank\">Chrome for Mobile<\/a>, which means we can use most of the HTML5 specification in a reliable way, without having to fix other browser&#8217;s edge-cases.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;!DOCTYPE HTML&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;meta charset=&quot;utf-8&quot; \/&gt;\r\n\t&lt;title&gt;App&lt;\/title&gt;\r\n\t&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot; \/&gt;\r\n\t&lt;script charset=&quot;utf-8&quot; src=&quot;js\/app.js&quot;&gt;&lt;\/script&gt;\r\n\t&lt;link rel=&quot;stylesheet&quot; href=&quot;css\/app.css&quot; \/&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\t&lt;h1&gt;Hello!&lt;\/h1&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>Not much to say so far, this is a bit plain but don&#8217;t worry we&#8217;ll soon add lots of stuff! Make sure the file loads correctly in your desktop browser as well as on your emulator, better make sure the basics work as expected before we add a bunch of complex stuff.<\/p>\n<p>Note the reference to <kbd>js\/app.js<\/kbd> which will contain as much of the app&#8217;s JS code as possible, and <kbd>css\/app.css<\/kbd> which is the same with CSS<\/p>\n<p>The <kbd>&lt;meta name=\"viewport\" \/&gt;<\/kbd> tag fixes a layout bug related to zooming, in some devices.<\/p>\n<p>Now I know that I promised not to focus on Java, but if your app is not supposed to be displayed horizontally, know that you can prevent the screen rotation by adding this to <kbd>AndroidManifest.xml<\/kbd>, as a property of your main activity:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;activity ... android:screenOrientation=&quot;portrait&quot;&gt;<\/pre>\n<h2 id=\"load-order\">How to Load Resources In The Right Order<\/h2>\n<p>Now let&#8217;s add some of the resources (JS &#038; CSS) which we&#8217;ll use throughout our app.&nbsp;We need to add a bunch of JS libraries &mdash;PhoneGap, jQuery &#038; jQuery.Mobile&mdash; and their corresponding stylesheets.&nbsp;Because all of those libraries are critical for the app to work as expected, they will have to be loaded in the <kbd>&lt;head&gt;<\/kbd> part of the file so that they load as soon as possible.&nbsp;We will see in the next part of this tutorial how to make sure everyone of them has loaded properly before doing stuff in JavaScript.<\/p>\n<p>The load order is critical as well.&nbsp;You want to load PhoneGap (<kbd>cordova-2.7.0.js<\/kbd>) first because it&#8217;s a pretty big library which has a bunch of self-executing code in it, used to establish a link between the HTML page and the phone native code.&nbsp;Then we have jQuery (<kbd>jquery-1.9.1.min.js<\/kbd>) which in itself is pretty much just a library; we need it loaded before jQuery.Mobile (<kbd>jquery-1.3.1.min.js<\/kbd>) because the latter does also have a lot of self-executing code used to modify the <abbr title=\"Document Object Model\">DOM<\/abbr> to make it more mobile-fashioned.<\/p>\n<p>Note that I have reserved some space for plugins your app might want to use later on, like <a href=\"https:\/\/github.com\/davejohnson\/phonegap-plugin-facebook-connect\/\" target=\"_blank\">FacebookConnect<\/a> or <a href=\"https:\/\/github.com\/m00sey\/PhoneGap-Toast\" target=\"_blank\">ToastNotifications<\/a>, because those are the kind of plugins which would probably need to be loaded early.<\/p>\n<p>As for the stylesheets, this is rather straight-forward: jQuery.Mobile, FontAwesome which I&#8217;ll use later on as icons throughout the app, and finally our own stylesheet.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;head&gt;\r\n\t&lt;meta charset=&quot;utf-8&quot; \/&gt;\r\n\t&lt;title&gt;App&lt;\/title&gt;\r\n\t&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot; \/&gt;\r\n&lt;!-- critical --&gt;\r\n\t&lt;!-- PhoneGap, jQuery, App, jQuery.Mobile --&gt;\r\n\t&lt;script charset=&quot;utf-8&quot; src=&quot;js\/cordova-2.7.0.js&quot;&gt;&lt;\/script&gt;\r\n\t&lt;script charset=&quot;utf-8&quot; src=&quot;js\/jquery-1.9.1.min.js&quot;&gt;&lt;\/script&gt;\r\n\t&lt;script charset=&quot;utf-8&quot; src=&quot;js\/app.js&quot;&gt;&lt;\/script&gt;\r\n\t&lt;script charset=&quot;utf-8&quot; src=&quot;js\/jquery.mobile-1.3.1.min.js&quot;&gt;&lt;\/script&gt;\r\n&lt;!-- critical --&gt;\r\n&lt;!-- plugins --&gt;\r\n&lt;!-- plugins--&gt;\r\n&lt;!-- themes --&gt;\r\n\t&lt;!-- jQuery Mobile, FontAwesome &amp; App --&gt;\r\n\t&lt;link rel=&quot;stylesheet&quot; href=&quot;css\/jquery-mobile\/jquery.mobile-1.3.1.min.css&quot; \/&gt;\r\n\t&lt;link rel=&quot;stylesheet&quot; href=&quot;css\/font-awesome\/css\/font-awesome.min.css&quot; \/&gt;\r\n\t&lt;link rel=&quot;stylesheet&quot; href=&quot;css\/app.css&quot; \/&gt;\r\n&lt;!-- \/themes --&gt;\r\n&lt;\/head&gt;<\/pre>\n<h2 id=\"jqm-page-structure\">jQuery.Mobile Page Structure<\/h2>\n<p>jQuery.Mobile allows us to integrate multiple activities into the same file, which is exactly what we&#8217;ll do in our app.&nbsp;For this to work, each page has to be built the following way:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;div data-role=&quot;page&quot; id=&quot;ActivityFoo&quot;&gt;\r\n\t&lt;div data-role=&quot;header&quot;&gt;\r\n\t\t&lt;h1&gt;Header&lt;\/h1&gt;\r\n\t&lt;\/div&gt;\r\n\t&lt;div data-role=&quot;content&quot;&gt;\r\n\t\t&lt;h1&gt;Content&lt;\/h1&gt;\r\n\t&lt;\/div&gt;\r\n\t&lt;div date-role=&quot;footer&quot;&gt;\r\n\t\t&lt;h1&gt;Footer&lt;\/h1&gt;\r\n\t&lt;\/div&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>Here&#8217;s how we&#8217;d integrate two activities into our <kbd>index.html<\/kbd> file :<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;body&gt;\r\n\t&lt;div data-role=&quot;page&quot; id=&quot;ActivityFoo&quot;&gt;\r\n\t\t&lt;div data-role=&quot;header&quot;&gt;\r\n\t\t\t&lt;h1&gt;Header 1&lt;\/h1&gt;\r\n\t\t\t&lt;div class=&quot;topmenu&quot; data-role=&quot;controlgroup&quot; data-type=&quot;horizontal&quot;&gt;\r\n\t\t\t\t&lt;a class=&quot;current-page-item&quot; href=&quot;index.html#ActivityFoo&quot; title=&quot;Foo&quot; data-role=&quot;button&quot;&gt;&lt;i class=&quot;fontawesome icon-home&quot;&gt;&lt;\/i&gt;&lt;\/a&gt;\r\n\t\t\t\t&lt;a href=&quot;index.html#ActivityBar&quot; title=&quot;Bar&quot; data-role=&quot;button&quot;&gt;&lt;i class=&quot;fontawesome icon-ticket&quot;&gt;&lt;\/i&gt;&lt;\/a&gt;\r\n\t\t\t&lt;\/div&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div data-role=&quot;content&quot;&gt;\r\n\t\t\t&lt;h1&gt;Content 1&lt;\/h1&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div date-role=&quot;footer&quot;&gt;\r\n\t\t\t&lt;h1&gt;Footer 1&lt;\/h1&gt;\r\n\t\t&lt;\/div&gt;\r\n\t&lt;\/div&gt;\r\n\t&lt;div data-role=&quot;page&quot; id=&quot;ActivityBar&quot;&gt;\r\n\t\t&lt;div data-role=&quot;header&quot;&gt;\r\n\t\t\t&lt;h1&gt;Header 2&lt;\/h1&gt;\r\n\t\t\t&lt;div class=&quot;topmenu&quot; data-role=&quot;controlgroup&quot; data-type=&quot;horizontal&quot;&gt;\r\n\t\t\t\t&lt;a href=&quot;index.html#ActivityFoo&quot; title=&quot;Foo&quot; data-role=&quot;button&quot;&gt;&lt;i class=&quot;fontawesome icon-home&quot;&gt;&lt;\/i&gt;&lt;\/a&gt;\r\n\t\t\t\t&lt;a class=&quot;current-page-item&quot; href=&quot;index.html#ActivityBar&quot; title=&quot;Bar&quot; data-role=&quot;button&quot;&gt;&lt;i class=&quot;fontawesome icon-ticket&quot;&gt;&lt;\/i&gt;&lt;\/a&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div data-role=&quot;content&quot;&gt;\r\n\t\t\t&lt;h1&gt;Content 2&lt;\/h1&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div date-role=&quot;footer&quot;&gt;\r\n\t\t\t&lt;h1&gt;Footer 2&lt;\/h1&gt;\r\n\t\t&lt;\/div&gt;\r\n\t&lt;\/div&gt;\r\n&lt;\/body&gt;<\/pre>\n<p>&#8230; and so on.&nbsp;I have added the basis for a navigation menu, using icons from FontAwesome.&nbsp;Here&#8217;s the result:<\/p>\n<div id=\"attachment_65\" style=\"width: 374px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-65\" src=\"http:\/\/thomasgr.im\/shares\/wp-content\/uploads\/sites\/3\/2013\/06\/phonegap-html-jquery-mobile-navigation-menu.png\" alt=\"A simple yet beautiful navigation menu using FontAwesome icons\" width=\"364\" height=\"90\" class=\"size-full wp-image-65\" srcset=\"https:\/\/thomasgr.im\/shares\/wp-content\/uploads\/sites\/3\/2013\/06\/phonegap-html-jquery-mobile-navigation-menu.png 364w, https:\/\/thomasgr.im\/shares\/wp-content\/uploads\/sites\/3\/2013\/06\/phonegap-html-jquery-mobile-navigation-menu-300x74.png 300w\" sizes=\"auto, (max-width: 364px) 100vw, 364px\" \/><p id=\"caption-attachment-65\" class=\"wp-caption-text\">A simple yet beautiful navigation menu using FontAwesome icons<\/p><\/div>\n<h2 id=\"final-code\">The Final Code<\/h2>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;!DOCTYPE HTML&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;meta charset=&quot;utf-8&quot; \/&gt;\r\n\t&lt;title&gt;App&lt;\/title&gt;\r\n\t&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot; \/&gt;\r\n&lt;!-- critical --&gt;\r\n\t&lt;!-- PhoneGap, jQuery, App, jQuery.Mobile --&gt;\r\n\t&lt;script charset=&quot;utf-8&quot; src=&quot;js\/cordova-2.7.0.js&quot;&gt;&lt;\/script&gt;\r\n\t&lt;script charset=&quot;utf-8&quot; src=&quot;js\/jquery-1.9.1.min.js&quot;&gt;&lt;\/script&gt;\r\n\t&lt;script charset=&quot;utf-8&quot; src=&quot;js\/app.js&quot;&gt;&lt;\/script&gt;\r\n\t&lt;script charset=&quot;utf-8&quot; src=&quot;js\/jquery.mobile-1.3.1.min.js&quot;&gt;&lt;\/script&gt;\r\n&lt;!-- critical --&gt;\r\n&lt;!-- plugins --&gt;\r\n&lt;!-- plugins--&gt;\r\n&lt;!-- themes --&gt;\r\n\t&lt;!-- jQuery Mobile, FontAwesome &amp; App --&gt;\r\n\t&lt;link rel=&quot;stylesheet&quot; href=&quot;css\/jquery-mobile\/jquery.mobile-1.3.1.min.css&quot; \/&gt;\r\n\t&lt;link rel=&quot;stylesheet&quot; href=&quot;css\/font-awesome\/css\/font-awesome.min.css&quot; \/&gt;\r\n\t&lt;link rel=&quot;stylesheet&quot; href=&quot;css\/app.css&quot; \/&gt;\r\n&lt;!-- \/themes --&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\t&lt;div data-role=&quot;page&quot; id=&quot;ActivityFoo&quot;&gt;\r\n\t\t&lt;div data-role=&quot;header&quot;&gt;\r\n\t\t\t&lt;h1&gt;Header 1&lt;\/h1&gt;\r\n\t\t\t&lt;div class=&quot;topmenu&quot; data-role=&quot;controlgroup&quot; data-type=&quot;horizontal&quot;&gt;\r\n\t\t\t\t&lt;a class=&quot;current-page-item&quot; href=&quot;index.html#ActivityFoo&quot; title=&quot;Foo&quot; data-role=&quot;button&quot;&gt;&lt;i class=&quot;fontawesome icon-home&quot;&gt;&lt;\/i&gt;&lt;\/a&gt;\r\n\t\t\t\t&lt;a href=&quot;index.html#ActivityBar&quot; title=&quot;Bar&quot; data-role=&quot;button&quot;&gt;&lt;i class=&quot;fontawesome icon-ticket&quot;&gt;&lt;\/i&gt;&lt;\/a&gt;\r\n\t\t\t&lt;\/div&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div data-role=&quot;content&quot;&gt;\r\n\t\t\t&lt;h1&gt;Content 1&lt;\/h1&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div date-role=&quot;footer&quot;&gt;\r\n\t\t\t&lt;h1&gt;Footer 1&lt;\/h1&gt;\r\n\t\t&lt;\/div&gt;\r\n\t&lt;\/div&gt;\r\n\t&lt;div data-role=&quot;page&quot; id=&quot;ActivityBar&quot;&gt;\r\n\t\t&lt;div data-role=&quot;header&quot;&gt;\r\n\t\t\t&lt;h1&gt;Header 2&lt;\/h1&gt;\r\n\t\t\t&lt;div class=&quot;topmenu&quot; data-role=&quot;controlgroup&quot; data-type=&quot;horizontal&quot;&gt;\r\n\t\t\t\t&lt;a href=&quot;index.html#ActivityFoo&quot; title=&quot;Foo&quot; data-role=&quot;button&quot;&gt;&lt;i class=&quot;fontawesome icon-home&quot;&gt;&lt;\/i&gt;&lt;\/a&gt;\r\n\t\t\t\t&lt;a class=&quot;current-page-item&quot; href=&quot;index.html#ActivityBar&quot; title=&quot;Bar&quot; data-role=&quot;button&quot;&gt;&lt;i class=&quot;fontawesome icon-ticket&quot;&gt;&lt;\/i&gt;&lt;\/a&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div data-role=&quot;content&quot;&gt;\r\n\t\t\t&lt;h1&gt;Content 2&lt;\/h1&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div date-role=&quot;footer&quot;&gt;\r\n\t\t\t&lt;h1&gt;Footer 2&lt;\/h1&gt;\r\n\t\t&lt;\/div&gt;\r\n\t&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>Sorry if this first part was a bit slow, we&#8217;ll soon be looking at some more interesting stuff.&nbsp;<a href=\"http:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-2-loading-javascript-properly\/\">Part 2 of this tutorial<\/a> should be published within a few hours\/days; in the mean time, happy coding! <strong>UPDATE:<\/strong> It&#8217;s online, check it out!<\/p>\n<p><!-- 3QK5UA6HBN7W --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this series, I will explain how I am using PhoneGap &#038; jQuery.Mobile (on top of jQuery) to build an App for Android while being able to test it in my desktop browser.&nbsp;This is not an introduction on PhoneGap or jQuery.Mobile per se.&nbsp;I will not focus on Java and I won&#8217;t explain how to install &#8230;<a class=\"post-readmore\" href=\"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/\">read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":72,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10,2],"tags":[19,18,12,13,14,11],"class_list":["post-18","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mobile","category-programming","tag-conception","tag-html5","tag-javascript","tag-jquery","tag-jquery-mobile","tag-phonegap"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Making An App With PhoneGap &amp; jQm Part I: A Simple HTML5 Skeleton - ThomasGR.IM<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Making An App With PhoneGap &amp; jQm Part I: A Simple HTML5 Skeleton - ThomasGR.IM\" \/>\n<meta property=\"og:description\" content=\"In this series, I will explain how I am using PhoneGap &#038; jQuery.Mobile (on top of jQuery) to build an App for Android while being able to test it in my desktop browser.&nbsp;This is not an introduction on PhoneGap or jQuery.Mobile per se.&nbsp;I will not focus on Java and I won&#8217;t explain how to install ...read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/\" \/>\n<meta property=\"og:site_name\" content=\"ThomasGR.IM\" \/>\n<meta property=\"article:published_time\" content=\"2013-06-02T13:57:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-08-11T10:28:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thomasgr.im\/shares\/wp-content\/uploads\/sites\/3\/2013\/06\/PhoneGap.png\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Thomas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/\"},\"author\":{\"name\":\"Thomas\",\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/#\\\/schema\\\/person\\\/a9f452898a055ceb0f17967802c852da\"},\"headline\":\"Making An App With PhoneGap &#038; jQm Part I: A Simple HTML5 Skeleton\",\"datePublished\":\"2013-06-02T13:57:43+00:00\",\"dateModified\":\"2013-08-11T10:28:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/\"},\"wordCount\":2117,\"commentCount\":5,\"image\":{\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2013\\\/06\\\/PhoneGap.png\",\"keywords\":[\"Conception\",\"HTML5\",\"JavaScript\",\"jQuery\",\"jQuery.Mobile\",\"PhoneGap\"],\"articleSection\":[\"Mobile\",\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/\",\"url\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/\",\"name\":\"Making An App With PhoneGap & jQm Part I: A Simple HTML5 Skeleton - ThomasGR.IM\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2013\\\/06\\\/PhoneGap.png\",\"datePublished\":\"2013-06-02T13:57:43+00:00\",\"dateModified\":\"2013-08-11T10:28:04+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/#\\\/schema\\\/person\\\/a9f452898a055ceb0f17967802c852da\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2013\\\/06\\\/PhoneGap.png\",\"contentUrl\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2013\\\/06\\\/PhoneGap.png\",\"width\":512,\"height\":512,\"caption\":\"PhoneGap - www.phonegap.com\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/2013\\\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Making An App With PhoneGap &#038; jQm Part I: A Simple HTML5 Skeleton\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/#website\",\"url\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/\",\"name\":\"ThomasGR.IM\",\"description\":\"Geeky Musing\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/#\\\/schema\\\/person\\\/a9f452898a055ceb0f17967802c852da\",\"name\":\"Thomas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/24002a8c89532079ac75ffa31bf174b5f4b88ef34601417767fd11b3d48436b7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/24002a8c89532079ac75ffa31bf174b5f4b88ef34601417767fd11b3d48436b7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/24002a8c89532079ac75ffa31bf174b5f4b88ef34601417767fd11b3d48436b7?s=96&d=mm&r=g\",\"caption\":\"Thomas\"},\"sameAs\":[\"https:\\\/\\\/thomasgr.im\\\/\"],\"url\":\"https:\\\/\\\/thomasgr.im\\\/shares\\\/author\\\/thomadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Making An App With PhoneGap & jQm Part I: A Simple HTML5 Skeleton - ThomasGR.IM","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/","og_locale":"en_US","og_type":"article","og_title":"Making An App With PhoneGap & jQm Part I: A Simple HTML5 Skeleton - ThomasGR.IM","og_description":"In this series, I will explain how I am using PhoneGap &#038; jQuery.Mobile (on top of jQuery) to build an App for Android while being able to test it in my desktop browser.&nbsp;This is not an introduction on PhoneGap or jQuery.Mobile per se.&nbsp;I will not focus on Java and I won&#8217;t explain how to install ...read more","og_url":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/","og_site_name":"ThomasGR.IM","article_published_time":"2013-06-02T13:57:43+00:00","article_modified_time":"2013-08-11T10:28:04+00:00","og_image":[{"width":512,"height":512,"url":"https:\/\/thomasgr.im\/shares\/wp-content\/uploads\/sites\/3\/2013\/06\/PhoneGap.png","type":"image\/png"}],"author":"Thomas","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/#article","isPartOf":{"@id":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/"},"author":{"name":"Thomas","@id":"https:\/\/thomasgr.im\/shares\/#\/schema\/person\/a9f452898a055ceb0f17967802c852da"},"headline":"Making An App With PhoneGap &#038; jQm Part I: A Simple HTML5 Skeleton","datePublished":"2013-06-02T13:57:43+00:00","dateModified":"2013-08-11T10:28:04+00:00","mainEntityOfPage":{"@id":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/"},"wordCount":2117,"commentCount":5,"image":{"@id":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/#primaryimage"},"thumbnailUrl":"https:\/\/thomasgr.im\/shares\/wp-content\/uploads\/sites\/3\/2013\/06\/PhoneGap.png","keywords":["Conception","HTML5","JavaScript","jQuery","jQuery.Mobile","PhoneGap"],"articleSection":["Mobile","Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/","url":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/","name":"Making An App With PhoneGap & jQm Part I: A Simple HTML5 Skeleton - ThomasGR.IM","isPartOf":{"@id":"https:\/\/thomasgr.im\/shares\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/#primaryimage"},"image":{"@id":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/#primaryimage"},"thumbnailUrl":"https:\/\/thomasgr.im\/shares\/wp-content\/uploads\/sites\/3\/2013\/06\/PhoneGap.png","datePublished":"2013-06-02T13:57:43+00:00","dateModified":"2013-08-11T10:28:04+00:00","author":{"@id":"https:\/\/thomasgr.im\/shares\/#\/schema\/person\/a9f452898a055ceb0f17967802c852da"},"breadcrumb":{"@id":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/#primaryimage","url":"https:\/\/thomasgr.im\/shares\/wp-content\/uploads\/sites\/3\/2013\/06\/PhoneGap.png","contentUrl":"https:\/\/thomasgr.im\/shares\/wp-content\/uploads\/sites\/3\/2013\/06\/PhoneGap.png","width":512,"height":512,"caption":"PhoneGap - www.phonegap.com"},{"@type":"BreadcrumbList","@id":"https:\/\/thomasgr.im\/shares\/2013\/making-app-with-phonegap-jqm-part-1-simple-html5-skeleton\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thomasgr.im\/shares\/"},{"@type":"ListItem","position":2,"name":"Making An App With PhoneGap &#038; jQm Part I: A Simple HTML5 Skeleton"}]},{"@type":"WebSite","@id":"https:\/\/thomasgr.im\/shares\/#website","url":"https:\/\/thomasgr.im\/shares\/","name":"ThomasGR.IM","description":"Geeky Musing","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thomasgr.im\/shares\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/thomasgr.im\/shares\/#\/schema\/person\/a9f452898a055ceb0f17967802c852da","name":"Thomas","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/24002a8c89532079ac75ffa31bf174b5f4b88ef34601417767fd11b3d48436b7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/24002a8c89532079ac75ffa31bf174b5f4b88ef34601417767fd11b3d48436b7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/24002a8c89532079ac75ffa31bf174b5f4b88ef34601417767fd11b3d48436b7?s=96&d=mm&r=g","caption":"Thomas"},"sameAs":["https:\/\/thomasgr.im\/"],"url":"https:\/\/thomasgr.im\/shares\/author\/thomadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/thomasgr.im\/shares\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thomasgr.im\/shares\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thomasgr.im\/shares\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thomasgr.im\/shares\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thomasgr.im\/shares\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":0,"href":"https:\/\/thomasgr.im\/shares\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thomasgr.im\/shares\/wp-json\/wp\/v2\/media\/72"}],"wp:attachment":[{"href":"https:\/\/thomasgr.im\/shares\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thomasgr.im\/shares\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thomasgr.im\/shares\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}