View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
Introduction toMobile Development By Pragnesh Vaghela Technology Three March 2012
2Agenda Mobile Matters iOS 5 Android When a Native Application makes sense? Mobile Web Applications Sencha Touch 2 jQuery Mobile PhoneGap Design Considerations for Building Mobile Applications Demos
5Understand the medium and the context Features What it means: GPS Location-Aware Touch Intimate and Interactive Physical Sensors (A/V) Intelligence Contacts Personal and Social Relevant at Point of Portability Consideration
8 What is iOS 5? Apple OS Objective-C Devices: iPhone 3GS and above iPod Touch 3rd Gen and above All iPads 200+ new features, including iCloud, iMessage, Notification Center Newsstand, Reminders Siri (voice dictation, commands) for iPhone 4Ss PC Free No longer requires a computer for Activation, Upgrades, Backups via Wi-Fi
9iOS 5 Enterprise Features Core iOS Apps Sync MobileMe Mail, Contacts, and Calendars across devices Sync Reminders, Bookmarks, Notes Photo Stream Automatically uploads pictures taken to iCloud Syncs to all devices Stores last 1000 photos taken on any device Document Sync For apps that use iCloud, synchronizes docs across all devices including Macs/PCs iWork will be the first mainstream app using iCloud Data (Key/Value) Sync Synchronizes key/value pair information within an app Generally used for settings, state information, etc. Backup Over the air backup of device, using Wi-Fi
10iOS 5 Development & Deployment Xcode for Lion (OSX) Free to download Complete Xcode developer toolset for Mac, iPhone, and iPad. It includes the Xcode IDE, iOS Simulator, and all required tools and frameworks for building OS X and iOS apps. iOS Developer Program ($99 / year) Develop your application with the iOS SDK and wealth of technical resources in the iOS Dev Center Test and debug your code on iPad, iPhone and iPod Touch Distribute your apps on the App Store via iTunes Technical Support includes 2 incidents with Apple engineers iOS Developer Enterprise Program ($299 / year) Distribute your in-house iOS apps to employees of your organization Test and Debug your application by directly installing and testing on the iPad, iPhone and iPod Touch Technical Support includes 2 incidents with Apple engineers per membership year iOS Developer University Program (Free) Degree granting higher education institution offering iOS development curriculum
iOS Testing 11 The Xcode unit-testing environment is based on the open-source SenTestingKit framework Xcode offers two types of unit tests: logic tests and application tests Logic tests - These tests check the correct functionality of a unit of code by itself (not in an app). You can also use logic tests to perform stress-testing of your code. Application tests - These tests check units of code in the context of your app. You can use these tests to perform hardware testing, such as getting the location of the device on which your app is running. Logic tests run only in simulators
12 Android Android is a Linux-based operating system for mobile devices that includes an operating system, middleware and key applications It is developed by the Open Handset Alliance led by Google Google releases the Android code as open-source, under the Apache License The Android Open Source Project (AOSP) is tasked with the maintenance and further development of Android
14Android Features Media support Streaming media support Additional hardware support Multi-touch Bluetooth Video calling Multitasking Voice based features Tethering Screen capture External storage
Android Development 16 Development Requirements Java Android SDK Eclipse (optional) Programming Language(s) Java – officially supported C/C++ – also possible but not supported IDE and Tools Android SDK Class Library Developer Tool: dx – Dalvik Cross-Assembler aapt – Android Asset Packaging Tool adb – Android Debug Bridge ddms – Dalvik Debug Monitor Service Emulator and System Images Documentation and Sample Code Eclipse IDE + ADT (Android Development Tools) Reduces Development and Testing Time Makes User Interface-Creation easier Makes Application Description Easier
17Android Testing The Android development environment includes an integrated testing framework that helps you test all aspects of your application The Android testing API is based on the JUnit API and extended with a instrumentation framework and Android-specific testing classes Android instrumentation is a set of control methods or "hooks" in the Android system. These hooks control an Android component independently of its normal lifecycle. They also control how Android loads applications The SDK tools for building and tests are available in Eclipse with ADT and also in command-line form The SDK also provides monkeyrunner, an API testing devices with Python programs, and UI/Application Exerciser Monkey, a command-line tool for stress-testing UIs by sending pseudo-random events to a device A key feature of the Android testing framework is its component-specific test case classes: Activity Testing - Input validation, Lifecycle events, Intents, Runtime configuration changes, Screen sizes and resolutions Content Provider Testing - business logic, resolver methods, public provider as a contract Service Testing - onCreate(), onDestroy(), correctly handles multiple calls from Context.startService(), startService() calls dont nest, business logic that your Service implements
18Android Deployment Google Play is a digital content service from Google which includes an online store for music, movies, books, and Android apps and games, as well as a cloud media player Service is accessible from the web, the Android app, or Google TV Content is instantly available across all of these devices after purchase Before you can publish software on the Google Play, you must do 3 things: Create a developer profile Agree to the Google Play Developer Distribution Agreement Pay a registration fee ( $25.00) with your credit card (using Google Checkout)
19iOS vs Android iOS AndroidBuy a Mac, download the free Xcode download the SDK, setup Eclipse andInstaller from the Mac App Store, and install Google‟s ADT Pluginstart writing codedevelopment is done in Objective-C development is done in Java or C/C++deploy costs $99/yr and app has to pass Google simple takes a $25 flat fee toa screening process shelf your appsiOS “Simulator” - runs native code Android Emulator - runs on a virtual machineDebug takes 5 seconds on the iOS Debug takes about 30 seconds toSimulator redeploy and start up in the Emulator on a perfectly-modern machinehas Interface Builder create UI layouts in XMLDevices have known screen dimensions suffers from fragmentation - manyand hardware versions of the OS and Devices on the market
23When does an App Make Sense? Interactivity/Gaming – for interactive games (think Angry Birds) an app is almost always going to be your best choice Regular Usage/Personalization – If your target users are going to be using your app in a personalized fashion on a regular basis (think EverNote) then an app provides a great way to do that. Complex Calculations or Reporting – If you need something that will take data and allow you to manipulate it with complex calculations, charts or reports (think banking or investment) an app will help you do that very effectively. Native Functionality or Processing Required - if you need to access a users camera or processing power an app will still do that much more effectively. No connection Required – If you need to provide offline access to content or perform functions without a network/wireless connection then an app makes sense.
31Analytics Google Analytics for Mobile Apps SDKs provide an interface for tracking activity within mobile apps and reporting that activity to Google Analytics Google Analytics SDKs for iOS and Android Usethe mobile tracking SDK to track your phone applications with the following Analytics interaction types: Pageview Tracking Event Tracking Ecommerce Tracking Custom Variables Mobile ads for your app (Android only)
32 Design Considerations for Building Mobile Applications Decide on the Application type - Native, Web or Hybrid Security - store data in encrypted form on the local device or access it real time Storage - Use the phone‟s data memory judiciously Connection & bandwidth - Understand that the users pay for every byte transmitted and received. Before you open up a data connection or before you start downloading that large piece of data from a service, warn the user Handle system interrupts effectively - When your application is pushed to the background, pause those game timers, disable those animations, and save the state of your application Memory usage - Limited memory so code wisely Battery - is very important. if you are building a location-aware application, do not query the GPS sensor every few milliseconds. Graphics - What differentiates your application from the „other‟ applications is UI responsiveness and graphics. Spend more time in formulating the UI. Sync - understand the synchronous and asynchronous way of interacting with the remote services. How will you handle push messages? How will you sync the local data store with the remote store?Finally, do not just build applications. Build solutions.