SlideShare une entreprise Scribd logo
1  sur  3
Télécharger pour lire hors ligne
ç«ð£¡«èŠ Íô‹ ݇†
󣌴 ÜŠO«èê¡ à¼
õ£‚è º®»‹. Þ‰î ç«ð£¡
«èŠèœ ðô ãHäè¬÷ Ýî
K‚A¡øù. ܬõ Accelerome
ter, Camera, Capture, Compass,
Connection, Contacts, Device,
Events, File, Geolocation,
Media, Notifi cation, Storage
«ð£¡ ø¬õò£°‹.
ÜŠO«èê¡ GÁõŠð†
´œ÷ ®¬õC¡ îèõ¬ô
ªðÁõ ®¬õv ãHä
ðò¡ð´Aø¶. ®¬õv ãHä
J¡ Šó£Šð˜†¯v Device
Name, Device Cordova, Device
Platform, Device uuid, Device
Version «ð£¡ø¬õ ò£°‹.
®¬õv ãHäJ¬ù ðò¡
𴈶õ W›õ¼‹ è†ì
¬÷è¬÷ õöƒè «õ‡´‹.
app/xme/plugins.xml-L™
<pluginname="Device"Value"
org.apache cordova. Device"/>
â¡Á ܬñ‚è «õ‡´‹.
ܶ«ð£ô app/Android.Mani
fest.xml ç¬ðL™,
< u s e s - p e r m i s s i o n
android=name=
"android.permission
READ-PHONE-STATE"/>
â¡Á ªè£´‚è «õ‡´‹.
®¬õv ãHä ðò¡ð´ˆ¶
õîŸè£ù Gó™-1™ ªè£´‚èŠ
ð†´œ÷¶. Þ‰î âO¬ñ
ò£ù Gó™ ðì‹-1™ àœ÷¶
«ð£¡Á «î£¡Á‹.
«èŠê˜ ãHä Íô‹
Ý®«ò£, Þ«ñx ñŸÁ‹
i®«ò£ «èŠê˜ ªêŒòô£‹.
«èŠê˜ ãHä ðò¡ð´ˆ¶
ç«ð£¡«èŠH™
݇†ó£Œ¬ì
à¼õ£‚èô£‹!
õîŸè£ù Plugins.xml ñŸÁ‹
Android Mainfest.xml L™ W›
è‡ì Gó™è¬÷ ܬñˆ
Fì «õ‡´‹.
app/res/xml/plugins.xml-
è£ù Gó™
<Plugin name="capture"
value="org.apache.cordova.
cap ture"/>
app/AndroidManifest/xml-
è£ù GóL™ Permission
õöƒAì «õ‡´‹.
< u s e s - p e r m i s s i o n
android:name=
"android.permission.RECOR
D_AUDIO"/>
< u s e s - p e r m i s s i o n
android:name=
"android.permission.WRITE
_ E X T E R N A L _ S T O R A G E " >
«èŠê˜ ªêòL¬ù Gó™-2™
ªè£´‚èŠð†´œ÷¶.
«èŠê˜ Ý®«ò£ â¡ø
ð†ì¬ù AO‚ ªêŒî¾ì¡
ðì‹-2™ àœ÷¶ «ð£¡Á
F¬ó «î£¡Á‹. Þî¬ù
ªê™«ðCJ™ GÁ¾õî¡
Íô‹ «èŠê˜ ªêòL¬ù
ªêò™ð´ˆîô£‹.
Ü´ˆî¶v«ì£«óxãHä
ðò¡ð´ˆ¶‹ º¬ø. ݇†
󣌴 ÜŠO«èê¡ èœ îè
õ™è¬÷ âv‚άô†
«ì†ì£«ðC™ «êI‚èô£‹.
app/res/xml/plugins.xml-
L™ H÷‚-Þ¡ GóL¬ù
Þ¬í‚è «õ‡´‹.
<plugin name="storage"
value = "org.apache. cordova.
storage"/>â¡ðî¬ù ªè£´
‚è «õ‡´‹.
«ì†ì£«ðv ðò¡ð´ˆ¶
õîŸè£ù Gó™-3™ ªè£´‚
èŠð†´œ÷¶.
Ü´ˆîî£è èªù‚û¡
ÜPõîŸè£ù ãHä ÜŠO«è
ê¡ «ð£¡ø ªêò™è¬÷ ªêŒ
õ ªï†å˜‚ èªù‚û¡
ÜõCòñ£ù‹.
Plugins.xml-™ W›è‡ì
Gó™è¬÷ ªè£´‚è «õ‡
´‹.
<Plugin name="Network
status"
ðì‹-1
ðì‹-2
ðì‹-3
Ý¡†ó£Œ´ -2
Þ󣋰ñ£˜ ªô†²Iï£ó£òí¡
25
<!DOCTYPE html>
<html>
<head>
<title>Device Properties Example</title>
<script type="text/javascript" charset="utf-
8" src="cordova-2.0.0.js"></script>
<script type="text/javascript" charset="utf-
8">
// Wait for Cordova to load
//
document.addEventListener("deviceready",
onDeviceReady, false);
// Cordova is ready
//
function onDeviceReady() {
var element =
document.getElementById('deviceProperties');
element.innerHTML = 'Device Name: ' +
device.name + '<br />' +
'Device Cordova: ' +
device.cordova + '<br />' +
'Device Platform: ' +
device.platform + '<br />' +
'Device UUID: ' +
device.uuid + '<br />' +
'Device Version: ' +
device.version + '<br />';
}
</script>
</head>
<body>
<p id="deviceProperties">Loading device
properties...</p>
</body>
</html>
value= "org.apche.cordova.
Network Mana ger"/>
H¡¹ app/AndroidMani
fast.xml -™
<uses-permission android:
name="android. permission.
ACCESS-NETWORK-STATE">/
Gó™-1
Gó™-2
application,
// allowing user to capture up to 2 audio
clips
navigator.device.capture.captureAudio(capture
Success, captureError, {limit: 2});
}
// Upload files to server
function uploadFile(mediaFile) {
var ft = new FileTransfer(),
path = mediaFile.fullPath,
name = mediaFile.name;
ft.upload(path,
"http://my.domain.com/upload.php",
function(result) {
console.log('Upload success: ' +
result.responseCode);
console.log(result.bytesSent + '
bytes sent');
},
function(error) {
console.log('Error uploading file ' +
path + ': ' + error.code);
},
{ fileName: name });
}
</script>
</head>
<body>
<button
onclick="captureAudio();">Capture
Audio</button> <br>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Capture Audio</title>
<script type="text/javascript"
charset="utf-8" src="cordova-
2.0.0.js"></script>
<script type="text/javascript"
charset="utf-8" src="json2.js"></script>
<script type="text/javascript"
charset="utf-8">
// Called when capture operation is finished
//
function captureSuccess(mediaFiles) {
var i, len;
for (i = 0, len = mediaFiles.length; i <
len; i += 1) {
uploadFile(mediaFiles[i]);
}
}
// Called if something bad happens.
//
function captureError(error) {
var msg = 'An error occurred during
capture: ' + error.code;
navigator.notification.alert(msg, null,
'Uh oh!');
}
// A button will call this function
//
function captureAudio() {
// Launch device audio recording
<!DOCTYPE html>
<html>
<head>
<title>Storage Example</title>
<script type="text/javascript" charset="utf-
8" src="cordova-2.0.0.js"></script>
<script type="text/javascript" charset="utf-
8">
// Wait for Cordova to load
//
document.addEventListener("deviceready",
onDeviceReady, false);
// Cordova is ready
//
function onDeviceReady() {
var db =
window.openDatabase("Database", "1.0",
"Cordova Demo", 200000);
db.transaction(populateDB, errorCB,
successCB);
}
// Populate the database
//
function populateDB(tx) {
tx.executeSql('DROP TABLE IF EXISTS
DEMO');
tx.executeSql('CREATE TABLE IF NOT
EXISTS DEMO (id unique, data)');
tx.executeSql('INSERT INTO DEMO (id,
data) VALUES (1, "First row")');
tx.executeSql('INSERT INTO DEMO (id,
data) VALUES (2, "Second row")');
}
// Transaction error callback
//
function errorCB(tx, err) {
alert("Error processing SQL: "+err);
}
// Transaction success callback
//
function successCB() {
alert("success!");
}
</script>
</head>
<body>
<h1>Example</h1>
<p>Database</p>
</body>
</html>]
<!DOCTYPE html>
<html>
<head>
<title>navigator.network.connection.type
Example</title>
<script type="text/javascript"
charset="utf-8" src="cordova-
2.0.0.js"></script>
<script type="text/javascript"
charset="utf-8">
// Wait for Cordova to load
//
document.addEventListener("deviceready",
onDeviceReady, false);
// Cordova is loaded and it is now safe to
make calls Cordova methods
//
function onDeviceReady() {
checkConnection();
}
function checkConnection() {
var networkState =
navigator.network.connection.type;
var states = {};
states[Connection.UNKNOWN] =
'Unknown connection';
states[Connection.ETHERNET] =
'Ethernet connection';
states[Connection.WIFI] = 'WiFi
connection';
states[Connection.CELL_2G] = 'Cell 2G
connection';
states[Connection.CELL_3G] = 'Cell 3G
connection';
states[Connection.CELL_4G] = 'Cell 4G
connection';
states[Connection.NONE] = 'No
network connection';
alert('Connection type: ' +
states[networkState]);
}
</script>
</head>
<body>
<p>A dialog box will report the network
state.</p>
</body>
</html>
- ªî£ì¼‹
Gó™-3
Gó™-4
<uses-permission android:
name="android.permission.
READ_PHONE_STATE"/>
Gó™ 4-™ èªù‚û¡
ÜPõîŸè£ù Gó™ ªè£´‚
èŠð†´œ÷¶. Þî¡ ðì‹-
3™ àœ÷¶ èªù‚û¬ù
ÜPòô£‹.
 𣘈î ꣡Áèœ
ܬùˆ¶‹ index.html -™
ܬñˆFì «õ‡´‹.

Contenu connexe

Tendances

The Mouse is mightier than the sword
The Mouse is mightier than the swordThe Mouse is mightier than the sword
The Mouse is mightier than the sword
Priyanka Aash
 
Itsecteam shell
Itsecteam shellItsecteam shell
Itsecteam shell
ady36
 
Comment pages 002
Comment pages 002Comment pages 002
Comment pages 002
RiNi Ft
 
Getting touchy - an introduction to touch and pointer events / Future of Web ...
Getting touchy - an introduction to touch and pointer events / Future of Web ...Getting touchy - an introduction to touch and pointer events / Future of Web ...
Getting touchy - an introduction to touch and pointer events / Future of Web ...
Patrick Lauke
 
Vidéo approche en immobilier
Vidéo approche en immobilierVidéo approche en immobilier
Vidéo approche en immobilier
hervepouliot
 
Creating custom views
Creating custom viewsCreating custom views
Creating custom views
Mu Chun Wang
 

Tendances (20)

Dirty Durham: Dry cleaning solvents leaked into part of Trinity Park | News
Dirty Durham: Dry cleaning solvents leaked into part of Trinity Park | NewsDirty Durham: Dry cleaning solvents leaked into part of Trinity Park | News
Dirty Durham: Dry cleaning solvents leaked into part of Trinity Park | News
 
Standford 2015 week6
Standford 2015 week6Standford 2015 week6
Standford 2015 week6
 
The Mouse is mightier than the sword
The Mouse is mightier than the swordThe Mouse is mightier than the sword
The Mouse is mightier than the sword
 
jQuery 實戰經驗講座
jQuery 實戰經驗講座jQuery 實戰經驗講座
jQuery 實戰經驗講座
 
Itsecteam shell
Itsecteam shellItsecteam shell
Itsecteam shell
 
RCEC Email 8.14.03
RCEC Email 8.14.03RCEC Email 8.14.03
RCEC Email 8.14.03
 
Php
PhpPhp
Php
 
Criando meu 1º game com android
Criando meu 1º game com androidCriando meu 1º game com android
Criando meu 1º game com android
 
Comment pages 002
Comment pages 002Comment pages 002
Comment pages 002
 
Create Splash Screen with Java Step by Step
Create Splash Screen with Java Step by StepCreate Splash Screen with Java Step by Step
Create Splash Screen with Java Step by Step
 
Getting touchy - an introduction to touch and pointer events / Future of Web ...
Getting touchy - an introduction to touch and pointer events / Future of Web ...Getting touchy - an introduction to touch and pointer events / Future of Web ...
Getting touchy - an introduction to touch and pointer events / Future of Web ...
 
Vidéo approche en immobilier
Vidéo approche en immobilierVidéo approche en immobilier
Vidéo approche en immobilier
 
WordPress Security: Be a Superhero - WordCamp Raleigh - May 2011
WordPress Security: Be a Superhero - WordCamp Raleigh - May 2011WordPress Security: Be a Superhero - WordCamp Raleigh - May 2011
WordPress Security: Be a Superhero - WordCamp Raleigh - May 2011
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and Smartphones
 
Trabalho 3ano
Trabalho 3anoTrabalho 3ano
Trabalho 3ano
 
OL4JSF - Latinoware 2010
OL4JSF - Latinoware 2010OL4JSF - Latinoware 2010
OL4JSF - Latinoware 2010
 
Convidar para page !!
Convidar para page !!Convidar para page !!
Convidar para page !!
 
R57.Php
R57.PhpR57.Php
R57.Php
 
Creating custom views
Creating custom viewsCreating custom views
Creating custom views
 
Nop2
Nop2Nop2
Nop2
 

En vedette

My First Awarded Patent
My First Awarded PatentMy First Awarded Patent
My First Awarded Patent
Muzaffar Iqbal
 
Training Center_Plan Situatie
Training Center_Plan SituatieTraining Center_Plan Situatie
Training Center_Plan Situatie
Laviniu Nacu
 
Menú alimenticio.
Menú alimenticio.Menú alimenticio.
Menú alimenticio.
luiscasta10
 
buyer course certificate
buyer course certificatebuyer course certificate
buyer course certificate
Mala Mohamed
 

En vedette (20)

Institucion educativa malteria
Institucion educativa malteriaInstitucion educativa malteria
Institucion educativa malteria
 
U.S. State Department MBA
U.S. State Department MBAU.S. State Department MBA
U.S. State Department MBA
 
Gemalto3
Gemalto3Gemalto3
Gemalto3
 
My First Awarded Patent
My First Awarded PatentMy First Awarded Patent
My First Awarded Patent
 
ANI Instrument
ANI InstrumentANI Instrument
ANI Instrument
 
My Job Experience. JD
My Job Experience. JDMy Job Experience. JD
My Job Experience. JD
 
Training Center_Plan Situatie
Training Center_Plan SituatieTraining Center_Plan Situatie
Training Center_Plan Situatie
 
Menú alimenticio.
Menú alimenticio.Menú alimenticio.
Menú alimenticio.
 
Nathalie Timmerman
Nathalie TimmermanNathalie Timmerman
Nathalie Timmerman
 
gjmtpjw
gjmtpjwgjmtpjw
gjmtpjw
 
DHL Recomendation Letter
DHL Recomendation LetterDHL Recomendation Letter
DHL Recomendation Letter
 
leauge of legend
leauge of legendleauge of legend
leauge of legend
 
Elenco degli Istituti della rete INSMLI
Elenco degli Istituti della rete INSMLIElenco degli Istituti della rete INSMLI
Elenco degli Istituti della rete INSMLI
 
Anuncio_a_la Card
Anuncio_a_la CardAnuncio_a_la Card
Anuncio_a_la Card
 
ASM Certificate_Taratov
ASM Certificate_TaratovASM Certificate_Taratov
ASM Certificate_Taratov
 
buyer course certificate
buyer course certificatebuyer course certificate
buyer course certificate
 
AHT Brochure
AHT BrochureAHT Brochure
AHT Brochure
 
Criatividade artistica com dobradura
Criatividade artistica com dobraduraCriatividade artistica com dobradura
Criatividade artistica com dobradura
 
ASQ Talk v4
ASQ Talk v4ASQ Talk v4
ASQ Talk v4
 
Removal of organosulfur from Jordanian Oil Shale
Removal of organosulfur from Jordanian Oil ShaleRemoval of organosulfur from Jordanian Oil Shale
Removal of organosulfur from Jordanian Oil Shale
 

Similaire à Phonegap for Android

Using AIR for Mobile Development
Using AIR for Mobile DevelopmentUsing AIR for Mobile Development
Using AIR for Mobile Development
Veronique Brossier
 
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformJavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the Platform
Robert Nyman
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W... 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Robert Nyman
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
Robert Nyman
 
HTML5 APIs - Where No Man Has Gone Before! - GothamJS
HTML5 APIs - Where No Man Has Gone Before! - GothamJSHTML5 APIs - Where No Man Has Gone Before! - GothamJS
HTML5 APIs - Where No Man Has Gone Before! - GothamJS
Robert Nyman
 
The Open Web and what it means
The Open Web and what it meansThe Open Web and what it means
The Open Web and what it means
Robert Nyman
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
Robert Nyman
 
HTML5 APIs - Where No Man Has Gone Before! - Paris Web
HTML5 APIs -  Where No Man Has Gone Before! - Paris WebHTML5 APIs -  Where No Man Has Gone Before! - Paris Web
HTML5 APIs - Where No Man Has Gone Before! - Paris Web
Robert Nyman
 
Firefox OS learnings & visions, WebAPIs - budapest.mobile
Firefox OS learnings & visions, WebAPIs - budapest.mobileFirefox OS learnings & visions, WebAPIs - budapest.mobile
Firefox OS learnings & visions, WebAPIs - budapest.mobile
Robert Nyman
 

Similaire à Phonegap for Android (20)

HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
Using AIR for Mobile Development
Using AIR for Mobile DevelopmentUsing AIR for Mobile Development
Using AIR for Mobile Development
 
Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
Mozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJSMozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJS
 
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformJavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the Platform
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W... 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
20141030 html5j-firefox os-deviceapi
20141030 html5j-firefox os-deviceapi20141030 html5j-firefox os-deviceapi
20141030 html5j-firefox os-deviceapi
 
Mobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScriptMobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScript
 
HTML5 APIs - Where No Man Has Gone Before! - GothamJS
HTML5 APIs - Where No Man Has Gone Before! - GothamJSHTML5 APIs - Where No Man Has Gone Before! - GothamJS
HTML5 APIs - Where No Man Has Gone Before! - GothamJS
 
The Open Web and what it means
The Open Web and what it meansThe Open Web and what it means
The Open Web and what it means
 
Creating and Distributing Mobile Web Applications with PhoneGap
Creating and Distributing Mobile Web Applications with PhoneGapCreating and Distributing Mobile Web Applications with PhoneGap
Creating and Distributing Mobile Web Applications with PhoneGap
 
Asynchronous Interfaces
Asynchronous InterfacesAsynchronous Interfaces
Asynchronous Interfaces
 
Make WordPress realtime.
Make WordPress realtime.Make WordPress realtime.
Make WordPress realtime.
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 
Building Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsBuilding Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSockets
 
HTML5 APIs - Where No Man Has Gone Before! - Paris Web
HTML5 APIs -  Where No Man Has Gone Before! - Paris WebHTML5 APIs -  Where No Man Has Gone Before! - Paris Web
HTML5 APIs - Where No Man Has Gone Before! - Paris Web
 
Firefox OS learnings & visions, WebAPIs - budapest.mobile
Firefox OS learnings & visions, WebAPIs - budapest.mobileFirefox OS learnings & visions, WebAPIs - budapest.mobile
Firefox OS learnings & visions, WebAPIs - budapest.mobile
 
Deployment talk dpc 13
Deployment talk dpc 13Deployment talk dpc 13
Deployment talk dpc 13
 
HTTP2
HTTP2HTTP2
HTTP2
 

Plus de Dr. Ramkumar Lakshminarayanan

Plus de Dr. Ramkumar Lakshminarayanan (20)

IT security awareness
IT security awarenessIT security awareness
IT security awareness
 
Basics of IT security
Basics of IT securityBasics of IT security
Basics of IT security
 
IT Security Awareness Posters
IT Security Awareness PostersIT Security Awareness Posters
IT Security Awareness Posters
 
Normalisation revision
Normalisation revisionNormalisation revision
Normalisation revision
 
Windows mobile programming
Windows mobile programmingWindows mobile programming
Windows mobile programming
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Web technology today
Web technology todayWeb technology today
Web technology today
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
Create and Sell Android App (in tamil)
Create and Sell Android App (in tamil)Create and Sell Android App (in tamil)
Create and Sell Android App (in tamil)
 
Android app - Creating Live Wallpaper (tamil)
Android app - Creating Live Wallpaper (tamil)Android app - Creating Live Wallpaper (tamil)
Android app - Creating Live Wallpaper (tamil)
 
Android Tips (Tamil)
Android Tips (Tamil)Android Tips (Tamil)
Android Tips (Tamil)
 
Android Animation (in tamil)
Android Animation (in tamil)Android Animation (in tamil)
Android Animation (in tamil)
 
Creating List in Android App (in tamil)
Creating List in Android App (in tamil)Creating List in Android App (in tamil)
Creating List in Android App (in tamil)
 
Single Touch event view in Android (in tamil)
Single Touch event view in Android (in tamil)Single Touch event view in Android (in tamil)
Single Touch event view in Android (in tamil)
 
Android Application using seekbar (in tamil)
Android Application using seekbar (in tamil)Android Application using seekbar (in tamil)
Android Application using seekbar (in tamil)
 
Rating Bar in Android Example
Rating Bar in Android ExampleRating Bar in Android Example
Rating Bar in Android Example
 
Creating Image Gallery - Android app (in tamil)
Creating Image Gallery - Android app (in tamil)Creating Image Gallery - Android app (in tamil)
Creating Image Gallery - Android app (in tamil)
 
Create Android App using web view (in tamil)
Create Android App using web view (in tamil)Create Android App using web view (in tamil)
Create Android App using web view (in tamil)
 
Hardware Interface in Android (in tamil)
Hardware Interface in Android (in tamil)Hardware Interface in Android (in tamil)
Hardware Interface in Android (in tamil)
 
GPS in Android (in tamil)
GPS in Android (in tamil)GPS in Android (in tamil)
GPS in Android (in tamil)
 

Dernier

Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Cara Menggugurkan Kandungan 087776558899
 

Dernier (6)

Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312
 
Mobile Application Development-Components and Layouts
Mobile Application Development-Components and LayoutsMobile Application Development-Components and Layouts
Mobile Application Development-Components and Layouts
 
Android Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesAndroid Application Components with Implementation & Examples
Android Application Components with Implementation & Examples
 
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
 
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
 
Mobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s ToolsMobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s Tools
 

Phonegap for Android

  • 1. ç«ð£¡«èŠ Íô‹ ݇† 󣌴 ÜŠO«èê¡ à¼ õ£‚è º®»‹. Þ‰î ç«ð£¡ «èŠèœ ðô ãHäè¬÷ Ýî K‚A¡øù. ܬõ Accelerome ter, Camera, Capture, Compass, Connection, Contacts, Device, Events, File, Geolocation, Media, Notifi cation, Storage «ð£¡ ø¬õò£°‹. ÜŠO«èê¡ GÁõŠð† ´œ÷ ®¬õC¡ îèõ¬ô ªðÁõ ®¬õv ãHä ðò¡ð´Aø¶. ®¬õv ãHä J¡ Šó£Šð˜†¯v Device Name, Device Cordova, Device Platform, Device uuid, Device Version «ð£¡ø¬õ ò£°‹. ®¬õv ãHäJ¬ù ðò¡ 𴈶õ W›õ¼‹ è†ì ¬÷è¬÷ õöƒè «õ‡´‹. app/xme/plugins.xml-L™ <pluginname="Device"Value" org.apache cordova. Device"/> â¡Á ܬñ‚è «õ‡´‹. ܶ«ð£ô app/Android.Mani fest.xml ç¬ðL™, < u s e s - p e r m i s s i o n android=name= "android.permission READ-PHONE-STATE"/> â¡Á ªè£´‚è «õ‡´‹. ®¬õv ãHä ðò¡ð´ˆ¶ õîŸè£ù Gó™-1™ ªè£´‚èŠ ð†´œ÷¶. Þ‰î âO¬ñ ò£ù Gó™ ðì‹-1™ àœ÷¶ «ð£¡Á «î£¡Á‹. «èŠê˜ ãHä Íô‹ Ý®«ò£, Þ«ñx ñŸÁ‹ i®«ò£ «èŠê˜ ªêŒòô£‹. «èŠê˜ ãHä ðò¡ð´ˆ¶ ç«ð£¡«èŠH™ ݇†ó£Œ¬ì à¼õ£‚èô£‹! õîŸè£ù Plugins.xml ñŸÁ‹ Android Mainfest.xml L™ W› è‡ì Gó™è¬÷ ܬñˆ Fì «õ‡´‹. app/res/xml/plugins.xml- è£ù Gó™ <Plugin name="capture" value="org.apache.cordova. cap ture"/> app/AndroidManifest/xml- è£ù GóL™ Permission õöƒAì «õ‡´‹. < u s e s - p e r m i s s i o n android:name= "android.permission.RECOR D_AUDIO"/> < u s e s - p e r m i s s i o n android:name= "android.permission.WRITE _ E X T E R N A L _ S T O R A G E " > «èŠê˜ ªêòL¬ù Gó™-2™ ªè£´‚èŠð†´œ÷¶. «èŠê˜ Ý®«ò£ â¡ø ð†ì¬ù AO‚ ªêŒî¾ì¡ ðì‹-2™ àœ÷¶ «ð£¡Á F¬ó «î£¡Á‹. Þî¬ù ªê™«ðCJ™ GÁ¾õî¡ Íô‹ «èŠê˜ ªêòL¬ù ªêò™ð´ˆîô£‹. Ü´ˆî¶v«ì£«óxãHä ðò¡ð´ˆ¶‹ º¬ø. ݇† 󣌴 ÜŠO«èê¡ èœ îè õ™è¬÷ âv‚άô† «ì†ì£«ðC™ «êI‚èô£‹. app/res/xml/plugins.xml- L™ H÷‚-Þ¡ GóL¬ù Þ¬í‚è «õ‡´‹. <plugin name="storage" value = "org.apache. cordova. storage"/>â¡ðî¬ù ªè£´ ‚è «õ‡´‹. «ì†ì£«ðv ðò¡ð´ˆ¶ õîŸè£ù Gó™-3™ ªè£´‚ èŠð†´œ÷¶. Ü´ˆîî£è èªù‚û¡ ÜPõîŸè£ù ãHä ÜŠO«è ê¡ «ð£¡ø ªêò™è¬÷ ªêŒ õ ªï†å˜‚ èªù‚û¡ ÜõCòñ£ù‹. Plugins.xml-™ W›è‡ì Gó™è¬÷ ªè£´‚è «õ‡ ´‹. <Plugin name="Network status" ðì‹-1 ðì‹-2 ðì‹-3
  • 2. Ý¡†ó£Œ´ -2 Þ󣋰ñ£˜ ªô†²Iï£ó£òí¡ 25 <!DOCTYPE html> <html> <head> <title>Device Properties Example</title> <script type="text/javascript" charset="utf- 8" src="cordova-2.0.0.js"></script> <script type="text/javascript" charset="utf- 8"> // Wait for Cordova to load // document.addEventListener("deviceready", onDeviceReady, false); // Cordova is ready // function onDeviceReady() { var element = document.getElementById('deviceProperties'); element.innerHTML = 'Device Name: ' + device.name + '<br />' + 'Device Cordova: ' + device.cordova + '<br />' + 'Device Platform: ' + device.platform + '<br />' + 'Device UUID: ' + device.uuid + '<br />' + 'Device Version: ' + device.version + '<br />'; } </script> </head> <body> <p id="deviceProperties">Loading device properties...</p> </body> </html> value= "org.apche.cordova. Network Mana ger"/> H¡¹ app/AndroidMani fast.xml -™ <uses-permission android: name="android. permission. ACCESS-NETWORK-STATE">/ Gó™-1 Gó™-2 application, // allowing user to capture up to 2 audio clips navigator.device.capture.captureAudio(capture Success, captureError, {limit: 2}); } // Upload files to server function uploadFile(mediaFile) { var ft = new FileTransfer(), path = mediaFile.fullPath, name = mediaFile.name; ft.upload(path, "http://my.domain.com/upload.php", function(result) { console.log('Upload success: ' + result.responseCode); console.log(result.bytesSent + ' bytes sent'); }, function(error) { console.log('Error uploading file ' + path + ': ' + error.code); }, { fileName: name }); } </script> </head> <body> <button onclick="captureAudio();">Capture Audio</button> <br> </body> </html> <!DOCTYPE html> <html> <head> <title>Capture Audio</title> <script type="text/javascript" charset="utf-8" src="cordova- 2.0.0.js"></script> <script type="text/javascript" charset="utf-8" src="json2.js"></script> <script type="text/javascript" charset="utf-8"> // Called when capture operation is finished // function captureSuccess(mediaFiles) { var i, len; for (i = 0, len = mediaFiles.length; i < len; i += 1) { uploadFile(mediaFiles[i]); } } // Called if something bad happens. // function captureError(error) { var msg = 'An error occurred during capture: ' + error.code; navigator.notification.alert(msg, null, 'Uh oh!'); } // A button will call this function // function captureAudio() { // Launch device audio recording
  • 3. <!DOCTYPE html> <html> <head> <title>Storage Example</title> <script type="text/javascript" charset="utf- 8" src="cordova-2.0.0.js"></script> <script type="text/javascript" charset="utf- 8"> // Wait for Cordova to load // document.addEventListener("deviceready", onDeviceReady, false); // Cordova is ready // function onDeviceReady() { var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000); db.transaction(populateDB, errorCB, successCB); } // Populate the database // function populateDB(tx) { tx.executeSql('DROP TABLE IF EXISTS DEMO'); tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)'); tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")'); tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")'); } // Transaction error callback // function errorCB(tx, err) { alert("Error processing SQL: "+err); } // Transaction success callback // function successCB() { alert("success!"); } </script> </head> <body> <h1>Example</h1> <p>Database</p> </body> </html>] <!DOCTYPE html> <html> <head> <title>navigator.network.connection.type Example</title> <script type="text/javascript" charset="utf-8" src="cordova- 2.0.0.js"></script> <script type="text/javascript" charset="utf-8"> // Wait for Cordova to load // document.addEventListener("deviceready", onDeviceReady, false); // Cordova is loaded and it is now safe to make calls Cordova methods // function onDeviceReady() { checkConnection(); } function checkConnection() { var networkState = navigator.network.connection.type; var states = {}; states[Connection.UNKNOWN] = 'Unknown connection'; states[Connection.ETHERNET] = 'Ethernet connection'; states[Connection.WIFI] = 'WiFi connection'; states[Connection.CELL_2G] = 'Cell 2G connection'; states[Connection.CELL_3G] = 'Cell 3G connection'; states[Connection.CELL_4G] = 'Cell 4G connection'; states[Connection.NONE] = 'No network connection'; alert('Connection type: ' + states[networkState]); } </script> </head> <body> <p>A dialog box will report the network state.</p> </body> </html> - ªî£ì¼‹ Gó™-3 Gó™-4 <uses-permission android: name="android.permission. READ_PHONE_STATE"/> Gó™ 4-™ èªù‚û¡ ÜPõîŸè£ù Gó™ ªè£´‚ èŠð†´œ÷¶. Þî¡ ðì‹- 3™ àœ÷¶ èªù‚û¬ù ÜPòô£‹.  𣘈î ꣡Áèœ Ü¬ùˆ¶‹ index.html -™ ܬñˆFì «õ‡´‹.