Haim Michael
December 20th, 2013
All logos, trade marks and brand names used in this presentation belong
to the respective owners.
You can watch the video clip at http://youtu.be/QVde5pZtMnM.

LifeMichael.com

PhoneGap Jump Start
●

Hybrid Applications Overview

●

Introduction to PhoneGap

●

PhoneGap Structure

●

Code Sample

●

Learning Resources

●

Questions & Answers

LifeMichael.com

Table of Content
●

The hybrid applications for mobile telephones include
code written in a native programming language and code
written in JavaScript that uses various client side web
technologies.
Device Display

Web Browser Object

LifeMichael.com

Hybrid Applications Overview
●

The PhoneGap open source framework allows us to
develop hybrid applications for mobile platforms that use
the platform native capabilities.

LifeMichael.com

Introduction
●

The PhoneGap framework includes two parts. The
JavaScript library that includes the definition of functions
that allow using the platform native capabilities. The
native code developed specifically separately for each
and every mobile platform.

●

The implementation of the JavaScript library is different
for each and every platform. It includes invocation of
functions that belong to the native part.

LifeMichael.com

PhoneGap Structure
●

You can find detailed documentation for PhoneGap
capabilities at http://docs.phonegap.com.

LifeMichael.com

PhoneGap Structure
package org.apache.cordova.example;
import android.app.Activity;
import android.os.Bundle;
import org.apache.cordova.*;
public class cordovaExample extends DroidGap
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.loadUrl("file:///android_asset/www/index.html");
}
}

LifeMichael.com

Code Sample
LifeMichael.com

Code Sample
<!DOCTYPE html>

index.html

<html>
<head>
...
<title>Hello World</title>
</head>
<body>
<div class="app">
<h1>Apache Cordova</h1>
...
</div>
<script type="text/javascript" src="cordova-2.3.0.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
</script>
</body>
</html>

LifeMichael.com

Code Sample
●

PhoneGap (Cordova) website at http://www.phonegap.com

●

You can find the free online course PhoneGap Basics at
http://abelski.lifemichael.com

●

The following recommended textbooks focus on the
PhoneGap open source framework:

LifeMichael.com

Learning Resources
●

Two courses you might find interesting include
Software Engineering in PHP
more info
Android 4.4 Java Applications Development
more info
HTML5 Cross Platform Mobile Applications
more info

●

If you enjoyed my lecture please leave me a comment
at http://speakerpedia.com/speakers/life-michael.
Thanks for your time!
Haim.

LifeMichael.com

Questions & Answers

PhoneGap Jump Start

  • 1.
    Haim Michael December 20th,2013 All logos, trade marks and brand names used in this presentation belong to the respective owners. You can watch the video clip at http://youtu.be/QVde5pZtMnM. LifeMichael.com PhoneGap Jump Start
  • 2.
    ● Hybrid Applications Overview ● Introductionto PhoneGap ● PhoneGap Structure ● Code Sample ● Learning Resources ● Questions & Answers LifeMichael.com Table of Content
  • 3.
    ● The hybrid applicationsfor mobile telephones include code written in a native programming language and code written in JavaScript that uses various client side web technologies. Device Display Web Browser Object LifeMichael.com Hybrid Applications Overview
  • 4.
    ● The PhoneGap opensource framework allows us to develop hybrid applications for mobile platforms that use the platform native capabilities. LifeMichael.com Introduction
  • 5.
    ● The PhoneGap frameworkincludes two parts. The JavaScript library that includes the definition of functions that allow using the platform native capabilities. The native code developed specifically separately for each and every mobile platform. ● The implementation of the JavaScript library is different for each and every platform. It includes invocation of functions that belong to the native part. LifeMichael.com PhoneGap Structure
  • 6.
    ● You can finddetailed documentation for PhoneGap capabilities at http://docs.phonegap.com. LifeMichael.com PhoneGap Structure
  • 7.
    package org.apache.cordova.example; import android.app.Activity; importandroid.os.Bundle; import org.apache.cordova.*; public class cordovaExample extends DroidGap { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.loadUrl("file:///android_asset/www/index.html"); } } LifeMichael.com Code Sample
  • 8.
  • 9.
    <!DOCTYPE html> index.html <html> <head> ... <title>Hello World</title> </head> <body> <divclass="app"> <h1>Apache Cordova</h1> ... </div> <script type="text/javascript" src="cordova-2.3.0.js"></script> <script type="text/javascript" src="js/index.js"></script> <script type="text/javascript"> app.initialize(); </script> </body> </html> LifeMichael.com Code Sample
  • 10.
    ● PhoneGap (Cordova) websiteat http://www.phonegap.com ● You can find the free online course PhoneGap Basics at http://abelski.lifemichael.com ● The following recommended textbooks focus on the PhoneGap open source framework: LifeMichael.com Learning Resources
  • 11.
    ● Two courses youmight find interesting include Software Engineering in PHP more info Android 4.4 Java Applications Development more info HTML5 Cross Platform Mobile Applications more info ● If you enjoyed my lecture please leave me a comment at http://speakerpedia.com/speakers/life-michael. Thanks for your time! Haim. LifeMichael.com Questions & Answers