SlideShare a Scribd company logo
Phonegap on Android
1.Android SDK & Eclipse Setup
 Install the JDK from the below URL :
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-
1880260.html
File Name: jdk-7u51-windows-x64.exe
 Down Load Android Eclipse Bundle from the below URL:
https://developer.android.com/sdk/index.html?hl=sk
 Extract the downloaded .ZIP file and install the “SDK Manager” which is one of the
executable file in the extracted folder.
 In the opened dialogue box select the items as below

2.Project Setup
 Down Load the phonegap from below URL & Extract the ZIP file:
https://codeload.github.com/phonegap/phonegap/legacy.zip/2.2.0
 Open the Eclipse IDE and create a new android application project (File  New 
other Project) as below,
 Import cordova-2.2.0.jar (Find in the extracted Phonegap folder -> android) file into your
project as below
 Add cordova-2.2.0.js (Find in the extracted Phonegap folder -> android) file into your
assets/www folder.
 Copy xml folder came with cordova source into res folder
 Replace your activity with this. ( Available in the SRC folder)
package com.example.testhello;
import org.apache.cordova.DroidGap;
import android.os.Bundle;
public class MainActivity extends DroidGap {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty("loadUrlTimeoutValue", 60000);
super.loadUrl("file:///android_asset/www/index.html",1000);
}
}
 Add index.html file into assets/www folder with this content.
<!DOCTYPE html>
<html>
<head>
<title>Contact Example</title>
<script type="text/javascript" charset="utf-8" src="cordova-
2.2.0.js"></script>
<script type="text/javascript" charset="utf-8">
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
callFetchContacts();
}
function callFetchContacts(){
var options = new ContactFindOptions();
options.multiple=true;
var fields = ["id","name", "displayName",
"organizations","emails","phoneNumbers","addresses"];
navigator.contacts.find(fields, onSuccess, onError, options);
}
function onSuccess(contacts) {
alert('Done');
alert(contacts.length);
for(var i = 0; i < contacts.length; i++){
alert(contacts[i].displayName);
}
};
function onError(contactError) {
alert('onError!');
}
</script>
</head>
<body>
<h1>Example</h1>
<p>Display Contacts</p>
</body>
</html>
 Add following permissions into your Manifest file.
 <uses-permission android:name="android.permission.CAMERA" />
 <uses-permission android:name="android.permission.VIBRATE" />
 <uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
 <uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION" />
 <uses-permission
android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
 <uses-permission android:name="android.permission.INTERNET" />
 <uses-permission android:name="android.permission.RECEIVE_SMS" />
 <uses-permission android:name="android.permission.RECORD_AUDIO" />
 <uses-permission android:name="android.permission.RECORD_VIDEO"/>
 <uses-permission
android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
 <uses-permission android:name="android.permission.READ_CONTACTS" />
 <uses-permission android:name="android.permission.WRITE_CONTACTS" />
 <uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 <uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />
 <uses-permission android:name="android.permission.GET_ACCOUNTS" />
 <uses-permission android:name="android.permission.BROADCAST_STICKY"
/>

More Related Content

Viewers also liked

Smart lecture
Smart lectureSmart lecture
Smart lecture
Lindsay Sachs Padilla
 
Franchising
Franchising Franchising
Franchising
Erikahernandez_24
 
Kitchen Cred Attendees
Kitchen Cred AttendeesKitchen Cred Attendees
Kitchen Cred Attendees
kitchencred
 
Franchising expo (1)
Franchising expo (1)Franchising expo (1)
Franchising expo (1)
Erikahernandez_24
 
Review for exam 1
Review for exam 1Review for exam 1
Review for exam 1
Brett Bauchner
 
Manufacturing and Service Technologies
Manufacturing and Service TechnologiesManufacturing and Service Technologies
Manufacturing and Service Technologies
samer dofash
 

Viewers also liked (6)

Smart lecture
Smart lectureSmart lecture
Smart lecture
 
Franchising
Franchising Franchising
Franchising
 
Kitchen Cred Attendees
Kitchen Cred AttendeesKitchen Cred Attendees
Kitchen Cred Attendees
 
Franchising expo (1)
Franchising expo (1)Franchising expo (1)
Franchising expo (1)
 
Review for exam 1
Review for exam 1Review for exam 1
Review for exam 1
 
Manufacturing and Service Technologies
Manufacturing and Service TechnologiesManufacturing and Service Technologies
Manufacturing and Service Technologies
 

Similar to Steps to setup phonegap

PhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J KrishnanPhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J Krishnan
OrisysIndia
 
Android chapter02-setup1-sdk
Android chapter02-setup1-sdkAndroid chapter02-setup1-sdk
Android chapter02-setup1-sdk
Tran Le Hoan
 
Ayw android env_setup
Ayw android env_setupAyw android env_setup
Ayw android env_setup
pbeerak
 
Pemrograman mobile menggunakan ionic framework
Pemrograman mobile menggunakan ionic frameworkPemrograman mobile menggunakan ionic framework
Pemrograman mobile menggunakan ionic framework
Puguh Rismadi
 
Android course (lecture2)
Android course (lecture2)Android course (lecture2)
Android course (lecture2)
Amira Elsayed Ismail
 
Eclipse & android setup
Eclipse & android setupEclipse & android setup
Eclipse & android setup
China Bigs
 
Android development session
Android development sessionAndroid development session
Android development session
Esraa Ibrahim
 
Android tutorial ppt
Android tutorial pptAndroid tutorial ppt
Android tutorial ppt
Rehna Renu
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Vaiga Nandhakumar
 
Android SDK and PhoneGap
Android SDK and PhoneGapAndroid SDK and PhoneGap
Android SDK and PhoneGap
Doncho Minkov
 
PhoneGap Lab
PhoneGap LabPhoneGap Lab
PhoneGap Lab
Leo Nguyen
 
Android studio
Android studioAndroid studio
Android studio
Andri Yabu
 
Android installation guide
Android installation guideAndroid installation guide
Android installation guide
magicshui
 
Complete steps to Integrate Push Notification for Your Cocos2dx App with Push...
Complete steps to Integrate Push Notification for Your Cocos2dx App with Push...Complete steps to Integrate Push Notification for Your Cocos2dx App with Push...
Complete steps to Integrate Push Notification for Your Cocos2dx App with Push...
ShepHertz
 
Session 2 prepare android development environment
Session 2   prepare android development environmentSession 2   prepare android development environment
Session 2 prepare android development environment
Adham Enaya
 
Final NEWS.pdf
Final NEWS.pdfFinal NEWS.pdf
Final NEWS.pdf
RebaMaheen
 
Final NewsApp.pdf
Final NewsApp.pdfFinal NewsApp.pdf
Final NewsApp.pdf
RebaMaheen
 
Android app upload
Android app uploadAndroid app upload
Internship presentation
Internship presentationInternship presentation
Internship presentation
Prativa Neupane
 
Mobile os by waqas
Mobile os by waqasMobile os by waqas
Mobile os by waqas
8neutron8
 

Similar to Steps to setup phonegap (20)

PhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J KrishnanPhoneGap Application Development - Santhi J Krishnan
PhoneGap Application Development - Santhi J Krishnan
 
Android chapter02-setup1-sdk
Android chapter02-setup1-sdkAndroid chapter02-setup1-sdk
Android chapter02-setup1-sdk
 
Ayw android env_setup
Ayw android env_setupAyw android env_setup
Ayw android env_setup
 
Pemrograman mobile menggunakan ionic framework
Pemrograman mobile menggunakan ionic frameworkPemrograman mobile menggunakan ionic framework
Pemrograman mobile menggunakan ionic framework
 
Android course (lecture2)
Android course (lecture2)Android course (lecture2)
Android course (lecture2)
 
Eclipse & android setup
Eclipse & android setupEclipse & android setup
Eclipse & android setup
 
Android development session
Android development sessionAndroid development session
Android development session
 
Android tutorial ppt
Android tutorial pptAndroid tutorial ppt
Android tutorial ppt
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android SDK and PhoneGap
Android SDK and PhoneGapAndroid SDK and PhoneGap
Android SDK and PhoneGap
 
PhoneGap Lab
PhoneGap LabPhoneGap Lab
PhoneGap Lab
 
Android studio
Android studioAndroid studio
Android studio
 
Android installation guide
Android installation guideAndroid installation guide
Android installation guide
 
Complete steps to Integrate Push Notification for Your Cocos2dx App with Push...
Complete steps to Integrate Push Notification for Your Cocos2dx App with Push...Complete steps to Integrate Push Notification for Your Cocos2dx App with Push...
Complete steps to Integrate Push Notification for Your Cocos2dx App with Push...
 
Session 2 prepare android development environment
Session 2   prepare android development environmentSession 2   prepare android development environment
Session 2 prepare android development environment
 
Final NEWS.pdf
Final NEWS.pdfFinal NEWS.pdf
Final NEWS.pdf
 
Final NewsApp.pdf
Final NewsApp.pdfFinal NewsApp.pdf
Final NewsApp.pdf
 
Android app upload
Android app uploadAndroid app upload
Android app upload
 
Internship presentation
Internship presentationInternship presentation
Internship presentation
 
Mobile os by waqas
Mobile os by waqasMobile os by waqas
Mobile os by waqas
 

More from Arun Kumar

IoT
IoT IoT
IOT-Demo
IOT-DemoIOT-Demo
IOT-Demo
Arun Kumar
 
Deep dive phonegap
Deep dive   phonegapDeep dive   phonegap
Deep dive phonegap
Arun Kumar
 
windows azure websites - Lab Manual
windows azure websites - Lab Manualwindows azure websites - Lab Manual
windows azure websites - Lab Manual
Arun Kumar
 
windows azure cloud services - Lab Manual
windows azure cloud services - Lab Manualwindows azure cloud services - Lab Manual
windows azure cloud services - Lab Manual
Arun Kumar
 
Introduction to windows azure IaaS , PaaS
Introduction to windows azure IaaS , PaaSIntroduction to windows azure IaaS , PaaS
Introduction to windows azure IaaS , PaaS
Arun Kumar
 

More from Arun Kumar (6)

IoT
IoT IoT
IoT
 
IOT-Demo
IOT-DemoIOT-Demo
IOT-Demo
 
Deep dive phonegap
Deep dive   phonegapDeep dive   phonegap
Deep dive phonegap
 
windows azure websites - Lab Manual
windows azure websites - Lab Manualwindows azure websites - Lab Manual
windows azure websites - Lab Manual
 
windows azure cloud services - Lab Manual
windows azure cloud services - Lab Manualwindows azure cloud services - Lab Manual
windows azure cloud services - Lab Manual
 
Introduction to windows azure IaaS , PaaS
Introduction to windows azure IaaS , PaaSIntroduction to windows azure IaaS , PaaS
Introduction to windows azure IaaS , PaaS
 

Recently uploaded

Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
Paul Brebner
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
gapen1
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Benefits of Artificial Intelligence in Healthcare!
Benefits of  Artificial Intelligence in Healthcare!Benefits of  Artificial Intelligence in Healthcare!
Benefits of Artificial Intelligence in Healthcare!
Prestware
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
Severalnines
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
kgyxske
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
DevOps Consulting Company | Hire DevOps Services
DevOps Consulting Company | Hire DevOps ServicesDevOps Consulting Company | Hire DevOps Services
DevOps Consulting Company | Hire DevOps Services
seospiralmantra
 

Recently uploaded (20)

Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Benefits of Artificial Intelligence in Healthcare!
Benefits of  Artificial Intelligence in Healthcare!Benefits of  Artificial Intelligence in Healthcare!
Benefits of Artificial Intelligence in Healthcare!
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
DevOps Consulting Company | Hire DevOps Services
DevOps Consulting Company | Hire DevOps ServicesDevOps Consulting Company | Hire DevOps Services
DevOps Consulting Company | Hire DevOps Services
 

Steps to setup phonegap

  • 2. 1.Android SDK & Eclipse Setup  Install the JDK from the below URL : http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads- 1880260.html File Name: jdk-7u51-windows-x64.exe  Down Load Android Eclipse Bundle from the below URL: https://developer.android.com/sdk/index.html?hl=sk  Extract the downloaded .ZIP file and install the “SDK Manager” which is one of the executable file in the extracted folder.  In the opened dialogue box select the items as below 
  • 3. 2.Project Setup  Down Load the phonegap from below URL & Extract the ZIP file: https://codeload.github.com/phonegap/phonegap/legacy.zip/2.2.0  Open the Eclipse IDE and create a new android application project (File  New  other Project) as below,  Import cordova-2.2.0.jar (Find in the extracted Phonegap folder -> android) file into your project as below
  • 4.  Add cordova-2.2.0.js (Find in the extracted Phonegap folder -> android) file into your assets/www folder.  Copy xml folder came with cordova source into res folder
  • 5.  Replace your activity with this. ( Available in the SRC folder) package com.example.testhello; import org.apache.cordova.DroidGap; import android.os.Bundle; public class MainActivity extends DroidGap { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("loadUrlTimeoutValue", 60000); super.loadUrl("file:///android_asset/www/index.html",1000); } }  Add index.html file into assets/www folder with this content. <!DOCTYPE html> <html> <head> <title>Contact Example</title> <script type="text/javascript" charset="utf-8" src="cordova- 2.2.0.js"></script> <script type="text/javascript" charset="utf-8"> document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { callFetchContacts(); } function callFetchContacts(){ var options = new ContactFindOptions(); options.multiple=true; var fields = ["id","name", "displayName", "organizations","emails","phoneNumbers","addresses"]; navigator.contacts.find(fields, onSuccess, onError, options);
  • 6. } function onSuccess(contacts) { alert('Done'); alert(contacts.length); for(var i = 0; i < contacts.length; i++){ alert(contacts[i].displayName); } }; function onError(contactError) { alert('onError!'); } </script> </head> <body> <h1>Example</h1> <p>Display Contacts</p> </body> </html>  Add following permissions into your Manifest file.  <uses-permission android:name="android.permission.CAMERA" />  <uses-permission android:name="android.permission.VIBRATE" />  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />  <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />  <uses-permission android:name="android.permission.INTERNET" />  <uses-permission android:name="android.permission.RECEIVE_SMS" />  <uses-permission android:name="android.permission.RECORD_AUDIO" />  <uses-permission android:name="android.permission.RECORD_VIDEO"/>  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />  <uses-permission android:name="android.permission.READ_CONTACTS" />  <uses-permission android:name="android.permission.WRITE_CONTACTS" />  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  • 7.  <uses-permission android:name="android.permission.GET_ACCOUNTS" />  <uses-permission android:name="android.permission.BROADCAST_STICKY" />