SlideShare a Scribd company logo
1 of 36
Non-conventional  Android  Programming
Who am I? Davide Cerbo http://jesty.it http://davide.cerbo.born-to-co.de http://www.linkedin.com/in/davidecerbo [email_address]
http://www.pro-netics.it [email_address]
Once upon a time...
New Features ,[object Object]
Compass
Camere
Hi-Res Screen
WI-FI
UMTS / HSPDA
Multi-touch
Where we going?
(market)
Too much devices
Many languages for many devices ,[object Object]
Android:  Java
BlackBerry:  Java
Nokia/Symbian:  Java  e  C++
Windows Mobile:  .NET  e  C
Write once, run anywhere Do you remember?
PhoneGap HTML + JAVASCRIPT + CSS  = PhoneGap.com
PhoneGap CROSS PLATFORM + API NATIVE INTERFACES + OPEN SOURCE = PhoneGap.com
What I'm able to do? ...and coming soon: camera, maps and file manager
Examples //GEO REFERENCING var   getLocation   =   function ()   { var   suc   =   function ( p ){ alert ( p . coords . latitude   +   " "   +   p . coords . longitude ); }; var   fail   =   function (){ alert ( "Location not available!" );}; navigator . geolocation . getCurrentPosition ( suc , fail ,   undefined ); } //VIBRACALL navigator . notification . vibrate ( 0 ); //BEEEEEEP navigator . notification . beep ( 2 );
Examples //ACCELEROMETER var   watchAccel   =   function ()   { var   s   =   function ( a ){ document . getElementById ( 'x' ). innerHTML   =   roundNumber ( a . x ); document . getElementById ( 'y' ). innerHTML   =   roundNumber ( a . y ); document . getElementById ( 'z' ). innerHTML   =   roundNumber ( a . z ); }; var   d   =   function (){}; var   opt   =   {}; opt . frequency   =   100 ; Timer   =   navigator . accelerometer . watchAcceleration ( s , f , opt ); } //CAMERA navigator . camera . getPicture ( dump_pic ,   fail ,   {   quality :   50   }); function   dump_pic ( data) { ... document . getElementById ( "test" ). src = "data:image/jpeg;base64,"   +  data ; }
Where's the trick? PhoneGap give us a  startup project  for every supported device. Every project is a simple application made of a  web browser  that work as a fullscreen app and where javascripts object will be injected. These objects has native API counterpart inside the device. We need to copy html, css, javascript and images into a specific project folder for every device that we need to  deploy  on. We also need to modify the project configuration, like project's name, author and so on... For Android  copy  these files into: ../my-android/assets/www/
Just to explain... ...take a look at this piece of code extracted from DroidGap.java included in the Android startup project: private   void  bindBrowser(WebView appView) { gap  =  new  PhoneGap( this , appView); geo  =  new  GeoBroker(appView,  this ); accel  =  new  AccelListener( this , appView); launcher  =  new  CameraLauncher(appView,  this ); // This creates the new javascript interfaces for PhoneGap appView.addJavascriptInterface( gap ,  "DroidGap" ); appView.addJavascriptInterface( geo ,  "Geo" ); appView.addJavascriptInterface( accel ,  "Accel" ); appView.addJavascriptInterface( launcher ,  "GapCam" ); }
Why Android? ,[object Object]
Linux and Java based (Dalvik)
So many Devices
OS highly customized ?
Android 2.0 (Eclair) in deep ,[object Object]
Microsoft Excange Server support
Home, Menu and Back buttons become optional
New HTML5 web browser
Camera application improved (flash, digital zoom, etc...)

More Related Content

What's hot

Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPresswpnepal
 
Symfony 4 Workshop - Limenius
Symfony 4 Workshop - LimeniusSymfony 4 Workshop - Limenius
Symfony 4 Workshop - LimeniusIgnacio Martín
 
Browsers with Wings
Browsers with WingsBrowsers with Wings
Browsers with WingsRemy Sharp
 
Google在Web前端方面的经验
Google在Web前端方面的经验Google在Web前端方面的经验
Google在Web前端方面的经验yiditushe
 
Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)Python Ireland
 
Scti 2011 minicurso jquery
Scti 2011 minicurso jqueryScti 2011 minicurso jquery
Scti 2011 minicurso jqueryciberglo
 
HTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreHTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreRemy Sharp
 
Diseño y Desarrollo de APIs
Diseño y Desarrollo de APIsDiseño y Desarrollo de APIs
Diseño y Desarrollo de APIsRaúl Neis
 
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterSymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterHaehnchen
 
Tips and tricks for building api heavy ruby on rails applications
Tips and tricks for building api heavy ruby on rails applicationsTips and tricks for building api heavy ruby on rails applications
Tips and tricks for building api heavy ruby on rails applicationsTim Cull
 
HTML, not just for desktops: Firefox OS - Congreso Universitario Móvil - 201...
HTML, not just for desktops: Firefox OS - Congreso Universitario Móvil - 201...HTML, not just for desktops: Firefox OS - Congreso Universitario Móvil - 201...
HTML, not just for desktops: Firefox OS - Congreso Universitario Móvil - 201...Frédéric Harper
 
How to build an AngularJS backend-ready app WITHOUT BACKEND
How to build an AngularJS backend-ready app WITHOUT BACKEND How to build an AngularJS backend-ready app WITHOUT BACKEND
How to build an AngularJS backend-ready app WITHOUT BACKEND Enrique Oriol Bermúdez
 

What's hot (18)

Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
 
Symfony 4 Workshop - Limenius
Symfony 4 Workshop - LimeniusSymfony 4 Workshop - Limenius
Symfony 4 Workshop - Limenius
 
Working With Canvas
Working With CanvasWorking With Canvas
Working With Canvas
 
Boost your angular app with web workers
Boost your angular app with web workersBoost your angular app with web workers
Boost your angular app with web workers
 
Browsers with Wings
Browsers with WingsBrowsers with Wings
Browsers with Wings
 
Sxsw 20090314
Sxsw 20090314Sxsw 20090314
Sxsw 20090314
 
Google在Web前端方面的经验
Google在Web前端方面的经验Google在Web前端方面的经验
Google在Web前端方面的经验
 
Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)
 
Scti 2011 minicurso jquery
Scti 2011 minicurso jqueryScti 2011 minicurso jquery
Scti 2011 minicurso jquery
 
HTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreHTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymore
 
Fast by Default
Fast by DefaultFast by Default
Fast by Default
 
Your code are my tests
Your code are my testsYour code are my tests
Your code are my tests
 
Diseño y Desarrollo de APIs
Diseño y Desarrollo de APIsDiseño y Desarrollo de APIs
Diseño y Desarrollo de APIs
 
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterSymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
 
Tips and tricks for building api heavy ruby on rails applications
Tips and tricks for building api heavy ruby on rails applicationsTips and tricks for building api heavy ruby on rails applications
Tips and tricks for building api heavy ruby on rails applications
 
HTML, not just for desktops: Firefox OS - Congreso Universitario Móvil - 201...
HTML, not just for desktops: Firefox OS - Congreso Universitario Móvil - 201...HTML, not just for desktops: Firefox OS - Congreso Universitario Móvil - 201...
HTML, not just for desktops: Firefox OS - Congreso Universitario Móvil - 201...
 
QA for PHP projects
QA for PHP projectsQA for PHP projects
QA for PHP projects
 
How to build an AngularJS backend-ready app WITHOUT BACKEND
How to build an AngularJS backend-ready app WITHOUT BACKEND How to build an AngularJS backend-ready app WITHOUT BACKEND
How to build an AngularJS backend-ready app WITHOUT BACKEND
 

Viewers also liked

Advance Android Programming - learning beyond basics
Advance Android Programming - learning beyond basicsAdvance Android Programming - learning beyond basics
Advance Android Programming - learning beyond basicsayman diab
 
Advance Android application development workshop day 1
Advance Android application development workshop day 1Advance Android application development workshop day 1
Advance Android application development workshop day 1cresco
 
Android Workshop 2013
Android Workshop 2013Android Workshop 2013
Android Workshop 2013Junda Ong
 
Memory problems in android programming
Memory problems in android programmingMemory problems in android programming
Memory problems in android programmingAiTi Education
 
Software proposal on android
Software proposal on androidSoftware proposal on android
Software proposal on androidKamrul Chowdhury
 
Asynchronous Programming in Android
Asynchronous Programming in AndroidAsynchronous Programming in Android
Asynchronous Programming in AndroidJohn Pendexter
 
Android UI Reference
Android UI ReferenceAndroid UI Reference
Android UI ReferenceGauntFace
 
Advance Android application development workshop day 3
Advance Android application development workshop day 3Advance Android application development workshop day 3
Advance Android application development workshop day 3cresco
 
Tips and tricks to attack memory problem in android programming
Tips and tricks to attack memory problem in android programmingTips and tricks to attack memory problem in android programming
Tips and tricks to attack memory problem in android programmingZalo_app
 
Stream upload and asynchronous job processing in large scale systems
Stream upload and asynchronous job processing  in large scale systemsStream upload and asynchronous job processing  in large scale systems
Stream upload and asynchronous job processing in large scale systemsZalo_app
 
Advance Android Application Development
Advance Android Application DevelopmentAdvance Android Application Development
Advance Android Application DevelopmentRamesh Prasad
 
Android Protips: Advanced Topics for Expert Android App Developers
Android Protips: Advanced Topics for Expert Android App DevelopersAndroid Protips: Advanced Topics for Expert Android App Developers
Android Protips: Advanced Topics for Expert Android App DevelopersReto Meier
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on AndroidTomáš Kypta
 
Android app development - Java Programming for Android
Android app development - Java Programming for AndroidAndroid app development - Java Programming for Android
Android app development - Java Programming for AndroidOUM SAOKOSAL
 
Reactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJavaReactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJavaAli Muzaffar
 

Viewers also liked (20)

Advance Android Programming - learning beyond basics
Advance Android Programming - learning beyond basicsAdvance Android Programming - learning beyond basics
Advance Android Programming - learning beyond basics
 
Advance Android application development workshop day 1
Advance Android application development workshop day 1Advance Android application development workshop day 1
Advance Android application development workshop day 1
 
Android Workshop 2013
Android Workshop 2013Android Workshop 2013
Android Workshop 2013
 
Memory problems in android programming
Memory problems in android programmingMemory problems in android programming
Memory problems in android programming
 
Software proposal on android
Software proposal on androidSoftware proposal on android
Software proposal on android
 
Asynchronous Programming in Android
Asynchronous Programming in AndroidAsynchronous Programming in Android
Asynchronous Programming in Android
 
Android UI Reference
Android UI ReferenceAndroid UI Reference
Android UI Reference
 
Advance Android application development workshop day 3
Advance Android application development workshop day 3Advance Android application development workshop day 3
Advance Android application development workshop day 3
 
Web Development Fundamentals
Web Development FundamentalsWeb Development Fundamentals
Web Development Fundamentals
 
Tips and tricks to attack memory problem in android programming
Tips and tricks to attack memory problem in android programmingTips and tricks to attack memory problem in android programming
Tips and tricks to attack memory problem in android programming
 
Stream upload and asynchronous job processing in large scale systems
Stream upload and asynchronous job processing  in large scale systemsStream upload and asynchronous job processing  in large scale systems
Stream upload and asynchronous job processing in large scale systems
 
Advance Android Application Development
Advance Android Application DevelopmentAdvance Android Application Development
Advance Android Application Development
 
Coding defines reality
Coding defines realityCoding defines reality
Coding defines reality
 
Android Protips: Advanced Topics for Expert Android App Developers
Android Protips: Advanced Topics for Expert Android App DevelopersAndroid Protips: Advanced Topics for Expert Android App Developers
Android Protips: Advanced Topics for Expert Android App Developers
 
Advance Android Layout Walkthrough
Advance Android Layout WalkthroughAdvance Android Layout Walkthrough
Advance Android Layout Walkthrough
 
Android Programming
Android ProgrammingAndroid Programming
Android Programming
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
 
Android app development - Java Programming for Android
Android app development - Java Programming for AndroidAndroid app development - Java Programming for Android
Android app development - Java Programming for Android
 
Reactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJavaReactive Programming on Android - RxAndroid - RxJava
Reactive Programming on Android - RxAndroid - RxJava
 
Sto L Pa N@Nfc Academy 2009
Sto L Pa N@Nfc Academy 2009Sto L Pa N@Nfc Academy 2009
Sto L Pa N@Nfc Academy 2009
 

Similar to Non Conventional Android Programming (English)

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 PlatformRobert Nyman
 
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCAndroid Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCJim Tochterman
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesOry Segal
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineAndy McKay
 
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
 
JavaScript and UI Architecture Best Practices
JavaScript and UI Architecture Best PracticesJavaScript and UI Architecture Best Practices
JavaScript and UI Architecture Best PracticesSiarhei Barysiuk
 
HTML5: huh, what is it good for?
HTML5: huh, what is it good for?HTML5: huh, what is it good for?
HTML5: huh, what is it good for?Remy Sharp
 
Phone gap 12 things you should know
Phone gap 12 things you should knowPhone gap 12 things you should know
Phone gap 12 things you should knowISOCHK
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...Wim Selles
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentationipolevoy
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklum Ukraine
 
Django + Vue, JavaScript de 3ª generación para modernizar Django
Django + Vue, JavaScript de 3ª generación para modernizar DjangoDjango + Vue, JavaScript de 3ª generación para modernizar Django
Django + Vue, JavaScript de 3ª generación para modernizar DjangoJavier Abadía
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best PracticesYekmer Simsek
 
21 android2 updated
21 android2 updated21 android2 updated
21 android2 updatedGhanaGTUG
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsDylan Jay
 

Similar to Non Conventional Android Programming (English) (20)

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
 
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCAndroid Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript Vulnerabilities
 
Phone Gap
Phone GapPhone Gap
Phone Gap
 
Developing in android
Developing in androidDeveloping in android
Developing in android
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App Engine
 
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...
 
JavaScript and UI Architecture Best Practices
JavaScript and UI Architecture Best PracticesJavaScript and UI Architecture Best Practices
JavaScript and UI Architecture Best Practices
 
HTML5: huh, what is it good for?
HTML5: huh, what is it good for?HTML5: huh, what is it good for?
HTML5: huh, what is it good for?
 
Phone gap 12 things you should know
Phone gap 12 things you should knowPhone gap 12 things you should know
Phone gap 12 things you should know
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
Dojo and Adobe AIR
Dojo and Adobe AIRDojo and Adobe AIR
Dojo and Adobe AIR
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce
 
mobl
moblmobl
mobl
 
Django + Vue, JavaScript de 3ª generación para modernizar Django
Django + Vue, JavaScript de 3ª generación para modernizar DjangoDjango + Vue, JavaScript de 3ª generación para modernizar Django
Django + Vue, JavaScript de 3ª generación para modernizar Django
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
 
21 android2 updated
21 android2 updated21 android2 updated
21 android2 updated
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
 

More from Davide Cerbo

Kotlin: forse è la volta buona (Trento)
Kotlin: forse è la volta buona (Trento)Kotlin: forse è la volta buona (Trento)
Kotlin: forse è la volta buona (Trento)Davide Cerbo
 
Kotlin: maybe it's the right time
Kotlin: maybe it's the right timeKotlin: maybe it's the right time
Kotlin: maybe it's the right timeDavide Cerbo
 
From 0 to React with ES6 and Tests
From 0 to React with ES6 and TestsFrom 0 to React with ES6 and Tests
From 0 to React with ES6 and TestsDavide Cerbo
 
Kotlin: foss' a vota bona (could be the right time)
Kotlin: foss' a vota bona (could be the right time)Kotlin: foss' a vota bona (could be the right time)
Kotlin: foss' a vota bona (could be the right time)Davide Cerbo
 
Il web intelligente
Il web intelligenteIl web intelligente
Il web intelligenteDavide Cerbo
 
Working between the clouds (versione completa)
Working between the clouds (versione completa)Working between the clouds (versione completa)
Working between the clouds (versione completa)Davide Cerbo
 
The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...
The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...
The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...Davide Cerbo
 
Working between the clouds
Working between the cloudsWorking between the clouds
Working between the cloudsDavide Cerbo
 
Non Conventional Android Programming (Italiano)
Non Conventional Android Programming (Italiano)Non Conventional Android Programming (Italiano)
Non Conventional Android Programming (Italiano)Davide Cerbo
 

More from Davide Cerbo (11)

Kotlin: forse è la volta buona (Trento)
Kotlin: forse è la volta buona (Trento)Kotlin: forse è la volta buona (Trento)
Kotlin: forse è la volta buona (Trento)
 
Kotlin: maybe it's the right time
Kotlin: maybe it's the right timeKotlin: maybe it's the right time
Kotlin: maybe it's the right time
 
From 0 to React with ES6 and Tests
From 0 to React with ES6 and TestsFrom 0 to React with ES6 and Tests
From 0 to React with ES6 and Tests
 
Kotlin: foss' a vota bona (could be the right time)
Kotlin: foss' a vota bona (could be the right time)Kotlin: foss' a vota bona (could be the right time)
Kotlin: foss' a vota bona (could be the right time)
 
Di cosa parlano?
Di cosa parlano?Di cosa parlano?
Di cosa parlano?
 
Adesso In Onda
Adesso In OndaAdesso In Onda
Adesso In Onda
 
Il web intelligente
Il web intelligenteIl web intelligente
Il web intelligente
 
Working between the clouds (versione completa)
Working between the clouds (versione completa)Working between the clouds (versione completa)
Working between the clouds (versione completa)
 
The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...
The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...
The Hitchhiker's Guide to testable code: semplici regole per scrivere codice ...
 
Working between the clouds
Working between the cloudsWorking between the clouds
Working between the clouds
 
Non Conventional Android Programming (Italiano)
Non Conventional Android Programming (Italiano)Non Conventional Android Programming (Italiano)
Non Conventional Android Programming (Italiano)
 

Recently uploaded

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Recently uploaded (20)

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Non Conventional Android Programming (English)

  • 2. Who am I? Davide Cerbo http://jesty.it http://davide.cerbo.born-to-co.de http://www.linkedin.com/in/davidecerbo [email_address]
  • 4. Once upon a time...
  • 5.
  • 15.
  • 19. Windows Mobile: .NET e C
  • 20. Write once, run anywhere Do you remember?
  • 21. PhoneGap HTML + JAVASCRIPT + CSS = PhoneGap.com
  • 22. PhoneGap CROSS PLATFORM + API NATIVE INTERFACES + OPEN SOURCE = PhoneGap.com
  • 23. What I'm able to do? ...and coming soon: camera, maps and file manager
  • 24. Examples //GEO REFERENCING var getLocation = function () { var suc = function ( p ){ alert ( p . coords . latitude + " " + p . coords . longitude ); }; var fail = function (){ alert ( "Location not available!" );}; navigator . geolocation . getCurrentPosition ( suc , fail , undefined ); } //VIBRACALL navigator . notification . vibrate ( 0 ); //BEEEEEEP navigator . notification . beep ( 2 );
  • 25. Examples //ACCELEROMETER var watchAccel = function () { var s = function ( a ){ document . getElementById ( 'x' ). innerHTML = roundNumber ( a . x ); document . getElementById ( 'y' ). innerHTML = roundNumber ( a . y ); document . getElementById ( 'z' ). innerHTML = roundNumber ( a . z ); }; var d = function (){}; var opt = {}; opt . frequency = 100 ; Timer = navigator . accelerometer . watchAcceleration ( s , f , opt ); } //CAMERA navigator . camera . getPicture ( dump_pic , fail , { quality : 50 }); function dump_pic ( data) { ... document . getElementById ( "test" ). src = "data:image/jpeg;base64," + data ; }
  • 26. Where's the trick? PhoneGap give us a startup project for every supported device. Every project is a simple application made of a web browser that work as a fullscreen app and where javascripts object will be injected. These objects has native API counterpart inside the device. We need to copy html, css, javascript and images into a specific project folder for every device that we need to deploy on. We also need to modify the project configuration, like project's name, author and so on... For Android copy these files into: ../my-android/assets/www/
  • 27. Just to explain... ...take a look at this piece of code extracted from DroidGap.java included in the Android startup project: private void bindBrowser(WebView appView) { gap = new PhoneGap( this , appView); geo = new GeoBroker(appView, this ); accel = new AccelListener( this , appView); launcher = new CameraLauncher(appView, this ); // This creates the new javascript interfaces for PhoneGap appView.addJavascriptInterface( gap , "DroidGap" ); appView.addJavascriptInterface( geo , "Geo" ); appView.addJavascriptInterface( accel , "Accel" ); appView.addJavascriptInterface( launcher , "GapCam" ); }
  • 28.
  • 29. Linux and Java based (Dalvik)
  • 32.
  • 34. Home, Menu and Back buttons become optional
  • 35. New HTML5 web browser
  • 36. Camera application improved (flash, digital zoom, etc...)
  • 37. SMS and MMS are now searchable
  • 40.
  • 41. No reflection needed, auto-code generation
  • 42. The final package does not contain extra libraries
  • 43. Developed and maintained by Wilfred Springer, ex Tom Tom Software Architect
  • 45. Designed for J2ME but also suitable for GWT and Android
  • 46.
  • 47. SpringME produce the code through the Apache Maven plugin Person instance = new Person(); instance.setName("Wilfred Springer"); --------------------------------------------------------- BeanFactory factory = new BeanFactory(); Person frank1 = (Person)factory.getBean(“frank”); Person frank2 = factory.getFrank();
  • 48.
  • 49. Setup the env variable ANDROID_SDK_15
  • 50. Install Android into our maven repository , for example: mvn install:install-file -DgroupId=android -DartifactId=android -Dversion=1.5_r2 -Dpackaging=jar -Dfile=$ANDROID_SDK_15/platforms/android-1.5/android.jar
  • 51. Let's create a brand new project: android create project --target 3 --name MavenAndroidExample --path ./maven-android-example --activity MavenAndroidActivity --package it.jesty.mavenandroid.example
  • 52.
  • 53. Let's clean up the mess: rm -r bin build.xml build.properties libs
  • 54. Create the emulator: android create avd --name mavenandroidadv --target 3
  • 55. Execute the emulator: emulator -avd mavenandroidadv
  • 56. Create our package with: mvn install (.apk file)
  • 57. Let's deploy the .apk into our device: mvn com.jayway.maven.plugins.android.generation2:maven-android-plugin:deploy
  • 58. ... <dependencies> <dependency> <groupId> android </groupId> <artifactId> android </artifactId> <version> 1.5_r2 </version> <scope> provided </scope> </dependency> </dependencies> <build> <sourceDirectory> src </sourceDirectory> <plugins> <plugin> <groupId> com.jayway.maven.plugins.android.generation2 </groupId> <artifactId> maven-android-plugin </artifactId> <version> 2.1.0 </version> <configuration> <sdk> <path> ${env.ANDROID_SDK_15} </path> <platform> 1.5 </platform> </sdk> <deleteConflictingFiles> True </deleteConflictingFiles> </configuration> <extensions> true </extensions> </plugin> ... Android + Maven
  • 59.  
  • 60.
  • 61. Create the application-context.xml into /context: <beans> <bean id=&quot;ciao&quot; class=&quot;it.jesty....Greeting&quot; scope=&quot;prototype&quot;> <constructor-arg value=&quot;Ciao&quot; /> </bean> </beans>
  • 63. Modify the MavenAndroidActivity.java: public void onCreate(Bundle savedInstanceState) { super .onCreate(savedInstanceState); TextView tv = new TextView( this ); tv.setText(((Greeting)new BeanFactory().getBean( &quot;ciao&quot; )) .to( &quot;MavenAndroidActivity&quot; )); //oppure: tv.setText(((Greeting)new BeanFactory().getCiao()).to(...)); }
  • 64. Repeat 8 and 9 steps mvn com.jayway.maven.plugins.android.generation2:maven-android-plugin:deploy
  • 65. ... <resources> <resource> <directory>${basedir}/context/</directory> <filtering>true</filtering> <includes> <include>**/*.xml</include> </includes> </resource> <resource> <directory> ${basedir}/target/generated-sources/spring-me </directory> </resource> </resources> <plugins> <plugin> <groupId>me.springframework</groupId> <artifactId>spring-me-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> <executions> <execution> <goals> <goal>generate</goal> <goal>dot</goal> </goals> <phase>generate-sources</phase> </execution> </executions> <configuration> <contextFile> ${basedir}/context/application-context.xml </contextFile> <className> it.jesty.mavenandroid.example.BeanFactory </className> <dotFile>${basedir}/target/poloko-context.dot</dotFile> </configuration> </plugin> ...
  • 66. Android + Maven + SpringME <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <beans xmlns=&quot;http://www.springframework.org/schema/beans&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot; http://www.springframework.org/schema /beans http://www.springframework.org/schema/beans/spring- beans-2.0.xsd&quot; default-lazy-init=&quot;true&quot; > <bean id=&quot;ciao&quot; class=&quot;it.jesty...Greeting&quot; scope=&quot;prototype&quot; > <constructor-arg value=&quot;Ciao&quot; /> </bean> <bean id=&quot;hello&quot; class=&quot;it.jest...Greeting&quot; scope=&quot;prototype&quot; > <constructor-arg value=&quot;Hello&quot; /> </bean> </beans>
  • 67. Android + Maven + SpringME package it.jesty.mavenandroid.example; public class Greeting { private String greeting; public Greeting(String greeting){ this .greeting = greeting; } public String to(String to){ return this .greeting + &quot;, &quot; + to; } }
  • 68.  
  • 69.
  • 73. Maven for Android http://code.google.com/p/maven-android-plugin http://code.google.com/p/masa
  • 74. Android development guidelines http://developer.android.com/guide/practices/design/performance.html
  • 75. Android, IPhone and IPod Touch Big Picture http://mashable.com/2009/09/15/iphone-android-apps-visualized/
  • 76.
  • 77. Apache Maven for Android examples
  • 78. SpringME examples ...all fully functional !!! :)
  • 79.  
  • 80.