SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
So You Want to Develop
on Android...
Timothy Lim @thewheat
thewheatfield.org /cornergeeks.com
Downloads:
http://tiny.cc/googleiobn
http://db.tt/kS08Pb6s
Overview
● apk = exe / dmg / tar.gz
○ We're pirates!
○ Portable & Transferable
●
●
●
● Permissions
○ Don't freak out the user
○ AndroidManifest.xml
Overview
HC/ICS emulators scare me
○ Get an Android device & download USB drivers now
http://developer.android.com/tools/extras/oem-usb.html
●
● So many pixels
○ so many platforms
○ so little time
■ Android 2.2
■ HVGA (480x320)
●
Get the Tools!
● SDK http://developers.android.com
○ tools to transfer apk to device
○ different Android platforms (1.x,2.x,...) & emulator
●
● Eclipse http://eclipse.org
○ Android Development Tools
(ADT) plugin
●
● PhoneGap http://phonegap.com
○ Mobile cross development platform
○ i.e. we don't need no Java! (ok maybe a little)
●
● HTML & Javascript based
○ Easy & Familiar (if not get familiar)
○ Exposes device features via Javascript objects
●
● Quick design & prototyping
○ all in the browser
●
● Cross platform
●
● Translatable skills
●
●
Why PhoneGap?
PhoneGap Sample - Starting Up
assets/www/index.html
Start something when app is loaded
●
<body onload="onLoad()">
-------------------------------------------------------
function onLoad() {
document.addEventListener("deviceready",
onDeviceReady, false);
}
function onDeviceReady(){
initializeMapICentre();
}
●
PhoneGap Sample - Interactivity
<a href="#" onclick="mediaPlay()" id="lnk_play">
<img id="play" src="images/play.png">
</a>
-------------------------------------------------------
function mediaPlay() {
if (!mediaPlaying) {
...
myAudio = new Media(URL_STREAM); myAudio.play();
mediaPlaying = true; ...
} else {
...
myAudio.stop();
mediaPlaying = false; ...
}
}
●
PhoneGap Sample - jQuery
jQuery makes things easier
-- Before jQuery executes -----------------------------------
<div id="aLink">hello</div>
<span class='foo'>ice</span>
<span class='foo'>cream</span>
<span class='foo'>sandwich</span>
●
-- Do jQuery -------------------------------------------------
$("#aLink").html("<a href='http://google.com'>Google</a>");
$(".foo").text("jelly"); $(".foo").eq(1).text("bean");
●
-- After jQuery executes ------------------------------------
<div id="aLink"><a href='http://google.com'>Google</a></div>
<span class='foo'>jelly</span>
<span class='foo'>bean</span>
<span class='foo'>jelly</span>
PhoneGap Sample - AJAX
// retrieve a webpage via PhoneGap
// not really applicable in normal AJAX calls, i.e. can't test in browser
●
$.get(url, function(data){
// data contains page source code
// process via Javascript
var pos_end = data.indexOf(" like");
var pos_start = data.indexOf(">", pos_end - 10);
$("#divContent").text(data.substring(pos_start+1, pos_end) + " likes");
});
● Your browser's BFFs
○ View source
○ Right click > Inspect element
(Chrome/Chromium/Firefox with Firebug/Opera)
○ WYSI(NOT)WYG
■ Facebook / Twitter
PhoneGap Sample - jQuery
$.get(url, function(data){
// process via jQuery
var element = $("<div></div>").append(data); var msg = '';
element.find(".tweets").each(function(i){
msg += $(this).find(".tweet-text").text() + "<hr>";
});
$("#divContent").html(msg);
});
●
● Doh!
○ <script> in data messes things up
○ White screen of death
● Don't waste time. Ask help / find alternative
Hackaway
● Make an app!
○ No limitations
○ Brunei site tie-in possibilities
■ Brunei Post Office - online services
■ Borneo Bulletin
● Possible features:
○ Map
○ Tweet list
○ Facebook
● Upload your code to GitHub
● PhoneGap
○ http://phonegap.com
● jQuery
○ http://jquery.com
● Github
○ https://github.com
○ https://github.com/thewheat/PhoneGapSample
● Artwork acknowledgements
○ CC-BY-NC: http://phonegap.com/artwork/
○ CC: http://android.com/developers/branding.html
● Illumination Software Creator
○ http://lunduke.com
●
Links & Stuff
Installing the Tools (Windows)
● c:android
○ readme.txt
● SDK
○ install 1..*.exe to c:
androidsdk
○ unzip updates in c:
androidsdk
■ 2...*.zip (platform
tools)
■ 3...*.zip (Android
2.2 files)
● Eclipse
○ unzip 4....*.zip to c:
eclipse (Eclipse
Classic 3.7.2 with
updates)
○ install ADT
●
● PhoneGap
○ http://phonegap.com
○ unzip to c:android
●

Contenu connexe

En vedette

OCHO HERRAMIENTAS ESENCIALES
OCHO HERRAMIENTAS ESENCIALESOCHO HERRAMIENTAS ESENCIALES
OCHO HERRAMIENTAS ESENCIALES
Ines Tazon
 
Sugar creation preso corrected final.ver1
Sugar creation preso corrected final.ver1Sugar creation preso corrected final.ver1
Sugar creation preso corrected final.ver1
Salman Surgit
 
How Social Media Can Support Your Volunteer Efforts
How Social Media Can Support Your Volunteer EffortsHow Social Media Can Support Your Volunteer Efforts
How Social Media Can Support Your Volunteer Efforts
Wahine Media
 
Patricio Andres Gallardo Cortes. Soluciones tecnológicas para la industria mi...
Patricio Andres Gallardo Cortes. Soluciones tecnológicas para la industria mi...Patricio Andres Gallardo Cortes. Soluciones tecnológicas para la industria mi...
Patricio Andres Gallardo Cortes. Soluciones tecnológicas para la industria mi...
iAgua .es
 
AIDS Cure Day Webinar on AIDS Research and Activism
AIDS Cure Day Webinar on AIDS Research and ActivismAIDS Cure Day Webinar on AIDS Research and Activism
AIDS Cure Day Webinar on AIDS Research and Activism
Kate Krauss
 

En vedette (20)

Faut-il un GIEC de l'énergie? Retour sur le séminaire des Houches
Faut-il un GIEC de l'énergie? Retour sur le séminaire des HouchesFaut-il un GIEC de l'énergie? Retour sur le séminaire des Houches
Faut-il un GIEC de l'énergie? Retour sur le séminaire des Houches
 
H.g. 680 transport
H.g. 680 transportH.g. 680 transport
H.g. 680 transport
 
Simt advertisement
Simt advertisementSimt advertisement
Simt advertisement
 
Energias renovables
Energias renovablesEnergias renovables
Energias renovables
 
риски трудоустройства
риски трудоустройствариски трудоустройства
риски трудоустройства
 
Catálogo de Campanas
Catálogo de CampanasCatálogo de Campanas
Catálogo de Campanas
 
Presentació barça
Presentació barçaPresentació barça
Presentació barça
 
From the drain to the reef part
From the drain to the reef partFrom the drain to the reef part
From the drain to the reef part
 
OCHO HERRAMIENTAS ESENCIALES
OCHO HERRAMIENTAS ESENCIALESOCHO HERRAMIENTAS ESENCIALES
OCHO HERRAMIENTAS ESENCIALES
 
Penn State #OERSummit16 Keynote
Penn State #OERSummit16 KeynotePenn State #OERSummit16 Keynote
Penn State #OERSummit16 Keynote
 
The Complete Roadmap Workbook Final Use
The Complete Roadmap Workbook Final UseThe Complete Roadmap Workbook Final Use
The Complete Roadmap Workbook Final Use
 
Sugar creation preso corrected final.ver1
Sugar creation preso corrected final.ver1Sugar creation preso corrected final.ver1
Sugar creation preso corrected final.ver1
 
S ri vs traditional aga khan rural support programme (india), locaton dangs d...
S ri vs traditional aga khan rural support programme (india), locaton dangs d...S ri vs traditional aga khan rural support programme (india), locaton dangs d...
S ri vs traditional aga khan rural support programme (india), locaton dangs d...
 
Social Advertising: Pacific New Media Class, Feb 2015
Social Advertising: Pacific New Media Class, Feb 2015Social Advertising: Pacific New Media Class, Feb 2015
Social Advertising: Pacific New Media Class, Feb 2015
 
How Social Media Can Support Your Volunteer Efforts
How Social Media Can Support Your Volunteer EffortsHow Social Media Can Support Your Volunteer Efforts
How Social Media Can Support Your Volunteer Efforts
 
KIRIKU presents SOLUTION for C:F
KIRIKU presents SOLUTION for C:FKIRIKU presents SOLUTION for C:F
KIRIKU presents SOLUTION for C:F
 
Patricio Andres Gallardo Cortes. Soluciones tecnológicas para la industria mi...
Patricio Andres Gallardo Cortes. Soluciones tecnológicas para la industria mi...Patricio Andres Gallardo Cortes. Soluciones tecnológicas para la industria mi...
Patricio Andres Gallardo Cortes. Soluciones tecnológicas para la industria mi...
 
2011-11-09 The State of Open Textbooks (Sloan-C Conference)
2011-11-09 The State of Open Textbooks (Sloan-C Conference)2011-11-09 The State of Open Textbooks (Sloan-C Conference)
2011-11-09 The State of Open Textbooks (Sloan-C Conference)
 
Radio Sua Voz
Radio Sua VozRadio Sua Voz
Radio Sua Voz
 
AIDS Cure Day Webinar on AIDS Research and Activism
AIDS Cure Day Webinar on AIDS Research and ActivismAIDS Cure Day Webinar on AIDS Research and Activism
AIDS Cure Day Webinar on AIDS Research and Activism
 

Similaire à So you want to Develop on Android....

Building native mobile apps using web technologies
Building native mobile apps using web technologiesBuilding native mobile apps using web technologies
Building native mobile apps using web technologies
Hjörtur Hilmarsson
 

Similaire à So you want to Develop on Android.... (20)

PhoneGap
PhoneGapPhoneGap
PhoneGap
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
9 Useful Things that Every Web Developer Needs to Know
9 Useful Things that Every Web Developer Needs to Know9 Useful Things that Every Web Developer Needs to Know
9 Useful Things that Every Web Developer Needs to Know
 
Building native mobile apps using web technologies
Building native mobile apps using web technologiesBuilding native mobile apps using web technologies
Building native mobile apps using web technologies
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript Vulnerabilities
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
Web scraping 101 with goutte
Web scraping 101 with goutteWeb scraping 101 with goutte
Web scraping 101 with goutte
 
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.jsDrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
 
ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!
 
WebPagetest Power Users - Velocity 2014
WebPagetest Power Users - Velocity 2014WebPagetest Power Users - Velocity 2014
WebPagetest Power Users - Velocity 2014
 
How browser work
How browser workHow browser work
How browser work
 
Use Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile AppsUse Web Skills To Build Mobile Apps
Use Web Skills To Build Mobile Apps
 
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
 
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 3/3 - Web components avec ...
 
Pen Testing Development
Pen Testing DevelopmentPen Testing Development
Pen Testing Development
 
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
Andriy Shalaenko - GO security tips
Andriy Shalaenko - GO security tipsAndriy Shalaenko - GO security tips
Andriy Shalaenko - GO security tips
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golang
 
Mobile Web Performance - Velocity 2011
Mobile Web Performance - Velocity 2011Mobile Web Performance - Velocity 2011
Mobile Web Performance - Velocity 2011
 

Dernier

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

So you want to Develop on Android....

  • 1. So You Want to Develop on Android... Timothy Lim @thewheat thewheatfield.org /cornergeeks.com Downloads: http://tiny.cc/googleiobn http://db.tt/kS08Pb6s
  • 2. Overview ● apk = exe / dmg / tar.gz ○ We're pirates! ○ Portable & Transferable ● ● ● ● Permissions ○ Don't freak out the user ○ AndroidManifest.xml
  • 3. Overview HC/ICS emulators scare me ○ Get an Android device & download USB drivers now http://developer.android.com/tools/extras/oem-usb.html ● ● So many pixels ○ so many platforms ○ so little time ■ Android 2.2 ■ HVGA (480x320) ●
  • 4. Get the Tools! ● SDK http://developers.android.com ○ tools to transfer apk to device ○ different Android platforms (1.x,2.x,...) & emulator ● ● Eclipse http://eclipse.org ○ Android Development Tools (ADT) plugin ● ● PhoneGap http://phonegap.com ○ Mobile cross development platform ○ i.e. we don't need no Java! (ok maybe a little) ●
  • 5. ● HTML & Javascript based ○ Easy & Familiar (if not get familiar) ○ Exposes device features via Javascript objects ● ● Quick design & prototyping ○ all in the browser ● ● Cross platform ● ● Translatable skills ● ● Why PhoneGap?
  • 6. PhoneGap Sample - Starting Up assets/www/index.html Start something when app is loaded ● <body onload="onLoad()"> ------------------------------------------------------- function onLoad() { document.addEventListener("deviceready", onDeviceReady, false); } function onDeviceReady(){ initializeMapICentre(); } ●
  • 7. PhoneGap Sample - Interactivity <a href="#" onclick="mediaPlay()" id="lnk_play"> <img id="play" src="images/play.png"> </a> ------------------------------------------------------- function mediaPlay() { if (!mediaPlaying) { ... myAudio = new Media(URL_STREAM); myAudio.play(); mediaPlaying = true; ... } else { ... myAudio.stop(); mediaPlaying = false; ... } } ●
  • 8. PhoneGap Sample - jQuery jQuery makes things easier -- Before jQuery executes ----------------------------------- <div id="aLink">hello</div> <span class='foo'>ice</span> <span class='foo'>cream</span> <span class='foo'>sandwich</span> ● -- Do jQuery ------------------------------------------------- $("#aLink").html("<a href='http://google.com'>Google</a>"); $(".foo").text("jelly"); $(".foo").eq(1).text("bean"); ● -- After jQuery executes ------------------------------------ <div id="aLink"><a href='http://google.com'>Google</a></div> <span class='foo'>jelly</span> <span class='foo'>bean</span> <span class='foo'>jelly</span>
  • 9. PhoneGap Sample - AJAX // retrieve a webpage via PhoneGap // not really applicable in normal AJAX calls, i.e. can't test in browser ● $.get(url, function(data){ // data contains page source code // process via Javascript var pos_end = data.indexOf(" like"); var pos_start = data.indexOf(">", pos_end - 10); $("#divContent").text(data.substring(pos_start+1, pos_end) + " likes"); }); ● Your browser's BFFs ○ View source ○ Right click > Inspect element (Chrome/Chromium/Firefox with Firebug/Opera) ○ WYSI(NOT)WYG ■ Facebook / Twitter
  • 10. PhoneGap Sample - jQuery $.get(url, function(data){ // process via jQuery var element = $("<div></div>").append(data); var msg = ''; element.find(".tweets").each(function(i){ msg += $(this).find(".tweet-text").text() + "<hr>"; }); $("#divContent").html(msg); }); ● ● Doh! ○ <script> in data messes things up ○ White screen of death ● Don't waste time. Ask help / find alternative
  • 11. Hackaway ● Make an app! ○ No limitations ○ Brunei site tie-in possibilities ■ Brunei Post Office - online services ■ Borneo Bulletin ● Possible features: ○ Map ○ Tweet list ○ Facebook ● Upload your code to GitHub
  • 12. ● PhoneGap ○ http://phonegap.com ● jQuery ○ http://jquery.com ● Github ○ https://github.com ○ https://github.com/thewheat/PhoneGapSample ● Artwork acknowledgements ○ CC-BY-NC: http://phonegap.com/artwork/ ○ CC: http://android.com/developers/branding.html ● Illumination Software Creator ○ http://lunduke.com ● Links & Stuff
  • 13. Installing the Tools (Windows) ● c:android ○ readme.txt ● SDK ○ install 1..*.exe to c: androidsdk ○ unzip updates in c: androidsdk ■ 2...*.zip (platform tools) ■ 3...*.zip (Android 2.2 files) ● Eclipse ○ unzip 4....*.zip to c: eclipse (Eclipse Classic 3.7.2 with updates) ○ install ADT ● ● PhoneGap ○ http://phonegap.com ○ unzip to c:android ●