SlideShare a Scribd company logo
MONSOON TECH 
2014 
Sep 15, 17, 22, 24, 25
BUILDING NATIVE APPS 
WITH 
Titanium Mobile 
Sep 15, 17, 22, 24, 25 
By Dharshana Jayamaha 
Monsoon Tech - 2014
Who am I? 
Dharshana Jayamaha 
me@geewantha.com 
http://geewantha.com 
http://github.com/dharshana 
http://www.slideshare.net/DharshanaJayamaha 
Monsoon Tech - 2014
Who’s Developed iPhone apps? 
Monsoon Tech - 2014
Who’s Developed Android apps? 
Monsoon Tech - 2014
Who’s Done JavaScript? 
Monsoon Tech - 2014
What if you could create Fully Native 
mobile apps using JavaScript? 
Monsoon Tech - 2014
Titanium Mobile 
Monsoon Tech - 2014
Titanium Mobile 
iPhone – iPad – Android - ** 
Monsoon Tech - 2014
Titanium Mobile 
iPhone – Android – Win - ** 
One Code base (Javascript) 
Monsoon Tech - 2014 
Android SDK 
TITANIUM SDK 
iOS SDK Win 8 SDK
Titanium Mobile 
Monsoon Tech - 2014
Apps in days not Months 
Monsoon Tech - 2014
Titanium Mobile APIs 
• Accelerameter 
• Analytics 
• App 
• Calendar 
• Cloud 
• Contacts 
• Database 
• Facebook 
• Filesystem 
• Geolocation 
• Map 
• Media 
• Network 
• Platform 
• IOStream 
• UI 
• XML 
• …. 
Monsoon Tech - 2014
$(“#nic”).click(function(){ 
// Some Code 
); 
VS 
$(“#nic").on("click",function(){ 
// Some Code 
}); 
Monsoon Tech - 2014
Media API : CAMERA 
Ti.Media.showCamera({ 
success: function(event){ 
// Captured image is returned as event.media 
}, 
cancel: function(){ 
// User canceled taking a photo 
}, 
error:function(){ 
// Problem taking a photo 
}, 
saveToPhotoGallery : true, 
allowEditing : false, 
autohide : false, //Important! 
}); 
https://github.com/dharshana/Titanium-Sample-Camara-script 
Monsoon Tech - 2014
GEOLOCATION API 
Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST; 
Ti.Geolocation.getCurrentPosition( function(e){ 
if(e.error){ 
Ti.API.error("Problem retriving location"); 
} else { 
var coords = e.coords; 
Ti.API.info("Latitude: "+ coords.latitude); 
Ti.API.info("Longitude: "+ coords.longitude); 
} 
},function(){ 
Ti.API.error("Location is not enable"); 
}); 
Monsoon Tech - 2014
MAPS API 
var mapView = Ti.Map.createView({ 
mapType : Ti.Map.STANDARD_TYPE, 
region : {latitude:33.65, longitude: 84.42, 
latitudeDelta:0.2, longitudeDelta:0.2}, 
animate : false, 
regionFit : true, 
userLocation : true, 
anotations:[ 
{ 
latitude : 33.64, 
longitude: 84.42, 
title: “ABC”, 
pincolor: 
} 
], 
top : 0, 
left : 0, 
}); 
Monsoon Tech - 2014
Titanium Studio 
Monsoon Tech - 2014
Basic App Structure 
• myFirstApp/ 
• manifest 
• tiapp.xml 
• Resources/ 
• app.js 
• android/ 
• Images/ 
• iphone/ 
• Images/ 
Monsoon Tech - 2014
app.js 
var tabGroup = Titanium.UI.createTabGroup(); 
var win1 = Titanium.UI.createWindow({ 
title:'Tab 1', backgroundColor:'#fff' 
}); 
var tab1 = Titanium.UI.createTab({ 
icon:'KS_nav_views.png', 
title:'Tab 1', 
window:win1, 
}); 
var label1 = Titanium.UI.createLabel({ 
color:'#999', 
text:'I am Window 1', 
font:{fontSize:20,fontFamily:'Helvetica Neue'}, 
textAlign:'center', 
width:'auto' 
}); 
win1.add(label1); 
tabGroup.addTab(tab1); 
tabGroup.addTab(tab2); 
tabGroup.open(); 
Monsoon Tech - 2014
Should know 
• px, % , dp , dpi 
• Protect the global scope 
• Mix of OO and Module pattern 
• Keep code DRY (Don’t Repeat Your self) 
• SQLight 
• Manifest file 
• Behaviors of mobile platforms 
• Application Global property 
Monsoon Tech - 2014
SQLight 
• Open source 
• Simple CRUD 
• Support SQL syntax 
• Light weight – 250Kbyte at runtime 
• Text, Integer, Real, Blob 
• NO Foreign key 
• No Data validation 
Monsoon Tech - 2014
Practical Session focus 
• Crete a new App 
• tiapp.xml 
• Run it on emulator 
• Handle device specific features 
• UI interaction 
• To do App 
https://github.com/dharshana/Titanium-Monsoon-Tech-sample 
Monsoon Tech - 2014
Device Specific Features 
• Cross-platform !== ‘Write once, Run Everywhere’ 
• iOS apps look different than Android Apps 
• Users wants their apps as platform norms 
• Android : back button, Hardware menu buttons 
• iOS : table edit, routes in maps 
if(Ti.Platform.osname == ‘android’){ 
win.backgroundColor : ‘Green’; 
} else { 
win.backgroundColor: ‘blue’; 
} 
Monsoon Tech - 2014
Beyond Basics 
• MVC – Alloy 
• Cloud service 
• MBaaS 
• Open & extensible (plugins for salesforce, 
amazon) 
• Analytics 
• Automated functional testing 
• Performance monitoring 
Monsoon Tech - 2014
Thank You 
Monsoon Tech - 2014

More Related Content

Similar to Native Mobile Apps with Titanium Mobile

[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps API[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps API
Google Cloud Platform - Japan
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator PresentationAaron Saunders
 
Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android
Don Thorp & Marshall Culpepper: Advanced Titanium Development for AndroidDon Thorp & Marshall Culpepper: Advanced Titanium Development for Android
Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android
Axway Appcelerator
 
Utilizing HTML5 APIs
Utilizing HTML5 APIsUtilizing HTML5 APIs
Utilizing HTML5 APIs
Ido Green
 
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Ido Green
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web apps
Chris Mills
 
Building Native Apps With Titanium Mobile
Building Native Apps With Titanium MobileBuilding Native Apps With Titanium Mobile
Building Native Apps With Titanium Mobile
Brendan Lim
 
Made for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsMade for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile Apps
SPC Adriatics
 
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
NgLQun
 
Modern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIsModern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIs
Ido Green
 
Wearable Development Ecosystem
Wearable Development EcosystemWearable Development Ecosystem
Wearable Development Ecosystem
Amish Gandhi
 
Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to Native
MartinSotirov
 
Xamarin tools
Xamarin toolsXamarin tools
Xamarin tools
Kym Phillpotts
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
e-Legion
 
Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application Development
Justin James
 
Mobile, web and cloud - the triple crown of modern applications
Mobile, web and cloud -  the triple crown of modern applicationsMobile, web and cloud -  the triple crown of modern applications
Mobile, web and cloud - the triple crown of modern applicationsIdo Green
 
Archit Rai Saxena - 2 years (1)
Archit Rai Saxena - 2 years (1)Archit Rai Saxena - 2 years (1)
Archit Rai Saxena - 2 years (1)archit rai saxena
 
Location Based Services Without the Cocoa
Location Based Services Without the CocoaLocation Based Services Without the Cocoa
Location Based Services Without the Cocoa
EDINA, University of Edinburgh
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the future
Chris Mills
 

Similar to Native Mobile Apps with Titanium Mobile (20)

[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps API[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps API
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 
CVnew
CVnewCVnew
CVnew
 
Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android
Don Thorp & Marshall Culpepper: Advanced Titanium Development for AndroidDon Thorp & Marshall Culpepper: Advanced Titanium Development for Android
Don Thorp & Marshall Culpepper: Advanced Titanium Development for Android
 
Utilizing HTML5 APIs
Utilizing HTML5 APIsUtilizing HTML5 APIs
Utilizing HTML5 APIs
 
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web apps
 
Building Native Apps With Titanium Mobile
Building Native Apps With Titanium MobileBuilding Native Apps With Titanium Mobile
Building Native Apps With Titanium Mobile
 
Made for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsMade for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile Apps
 
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
 
Modern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIsModern Web Applications Utilizing HTML5 APIs
Modern Web Applications Utilizing HTML5 APIs
 
Wearable Development Ecosystem
Wearable Development EcosystemWearable Development Ecosystem
Wearable Development Ecosystem
 
Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to Native
 
Xamarin tools
Xamarin toolsXamarin tools
Xamarin tools
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
 
Ionic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application DevelopmentIonic - Revolutionizing Hybrid Mobile Application Development
Ionic - Revolutionizing Hybrid Mobile Application Development
 
Mobile, web and cloud - the triple crown of modern applications
Mobile, web and cloud -  the triple crown of modern applicationsMobile, web and cloud -  the triple crown of modern applications
Mobile, web and cloud - the triple crown of modern applications
 
Archit Rai Saxena - 2 years (1)
Archit Rai Saxena - 2 years (1)Archit Rai Saxena - 2 years (1)
Archit Rai Saxena - 2 years (1)
 
Location Based Services Without the Cocoa
Location Based Services Without the CocoaLocation Based Services Without the Cocoa
Location Based Services Without the Cocoa
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the future
 

Recently uploaded

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 

Recently uploaded (20)

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 

Native Mobile Apps with Titanium Mobile

  • 1. MONSOON TECH 2014 Sep 15, 17, 22, 24, 25
  • 2. BUILDING NATIVE APPS WITH Titanium Mobile Sep 15, 17, 22, 24, 25 By Dharshana Jayamaha Monsoon Tech - 2014
  • 3. Who am I? Dharshana Jayamaha me@geewantha.com http://geewantha.com http://github.com/dharshana http://www.slideshare.net/DharshanaJayamaha Monsoon Tech - 2014
  • 4. Who’s Developed iPhone apps? Monsoon Tech - 2014
  • 5. Who’s Developed Android apps? Monsoon Tech - 2014
  • 6. Who’s Done JavaScript? Monsoon Tech - 2014
  • 7. What if you could create Fully Native mobile apps using JavaScript? Monsoon Tech - 2014
  • 9. Titanium Mobile iPhone – iPad – Android - ** Monsoon Tech - 2014
  • 10. Titanium Mobile iPhone – Android – Win - ** One Code base (Javascript) Monsoon Tech - 2014 Android SDK TITANIUM SDK iOS SDK Win 8 SDK
  • 11. Titanium Mobile Monsoon Tech - 2014
  • 12. Apps in days not Months Monsoon Tech - 2014
  • 13. Titanium Mobile APIs • Accelerameter • Analytics • App • Calendar • Cloud • Contacts • Database • Facebook • Filesystem • Geolocation • Map • Media • Network • Platform • IOStream • UI • XML • …. Monsoon Tech - 2014
  • 14. $(“#nic”).click(function(){ // Some Code ); VS $(“#nic").on("click",function(){ // Some Code }); Monsoon Tech - 2014
  • 15. Media API : CAMERA Ti.Media.showCamera({ success: function(event){ // Captured image is returned as event.media }, cancel: function(){ // User canceled taking a photo }, error:function(){ // Problem taking a photo }, saveToPhotoGallery : true, allowEditing : false, autohide : false, //Important! }); https://github.com/dharshana/Titanium-Sample-Camara-script Monsoon Tech - 2014
  • 16. GEOLOCATION API Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST; Ti.Geolocation.getCurrentPosition( function(e){ if(e.error){ Ti.API.error("Problem retriving location"); } else { var coords = e.coords; Ti.API.info("Latitude: "+ coords.latitude); Ti.API.info("Longitude: "+ coords.longitude); } },function(){ Ti.API.error("Location is not enable"); }); Monsoon Tech - 2014
  • 17. MAPS API var mapView = Ti.Map.createView({ mapType : Ti.Map.STANDARD_TYPE, region : {latitude:33.65, longitude: 84.42, latitudeDelta:0.2, longitudeDelta:0.2}, animate : false, regionFit : true, userLocation : true, anotations:[ { latitude : 33.64, longitude: 84.42, title: “ABC”, pincolor: } ], top : 0, left : 0, }); Monsoon Tech - 2014
  • 18. Titanium Studio Monsoon Tech - 2014
  • 19. Basic App Structure • myFirstApp/ • manifest • tiapp.xml • Resources/ • app.js • android/ • Images/ • iphone/ • Images/ Monsoon Tech - 2014
  • 20. app.js var tabGroup = Titanium.UI.createTabGroup(); var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var tab1 = Titanium.UI.createTab({ icon:'KS_nav_views.png', title:'Tab 1', window:win1, }); var label1 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 1', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win1.add(label1); tabGroup.addTab(tab1); tabGroup.addTab(tab2); tabGroup.open(); Monsoon Tech - 2014
  • 21. Should know • px, % , dp , dpi • Protect the global scope • Mix of OO and Module pattern • Keep code DRY (Don’t Repeat Your self) • SQLight • Manifest file • Behaviors of mobile platforms • Application Global property Monsoon Tech - 2014
  • 22. SQLight • Open source • Simple CRUD • Support SQL syntax • Light weight – 250Kbyte at runtime • Text, Integer, Real, Blob • NO Foreign key • No Data validation Monsoon Tech - 2014
  • 23. Practical Session focus • Crete a new App • tiapp.xml • Run it on emulator • Handle device specific features • UI interaction • To do App https://github.com/dharshana/Titanium-Monsoon-Tech-sample Monsoon Tech - 2014
  • 24. Device Specific Features • Cross-platform !== ‘Write once, Run Everywhere’ • iOS apps look different than Android Apps • Users wants their apps as platform norms • Android : back button, Hardware menu buttons • iOS : table edit, routes in maps if(Ti.Platform.osname == ‘android’){ win.backgroundColor : ‘Green’; } else { win.backgroundColor: ‘blue’; } Monsoon Tech - 2014
  • 25. Beyond Basics • MVC – Alloy • Cloud service • MBaaS • Open & extensible (plugins for salesforce, amazon) • Analytics • Automated functional testing • Performance monitoring Monsoon Tech - 2014
  • 26. Thank You Monsoon Tech - 2014