Introduction
description
Transcript of Introduction
![Page 1: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/1.jpg)
Introduction
App Dev For Mobile DevicesNASRULLAH
![Page 2: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/2.jpg)
Mobile application development
• Mobile application development is the process by which application software is developed for small low-power handheld devices such as e phones. These applications are either pre-installed on phones during manufacturing, or downloaded by customers from various mobile software distribution platforms
![Page 3: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/3.jpg)
Mobile Operating System
• A mobile operating system (mobile OS) is the operating system that controls a mobile device.
• Modern mobile operating systems combine the features of a personal computer operating system with touchscreen, cellular, Bluetooth, WiFi, GPS mobile navigation, camera, video camera, speech recognition, voice recorder, music player, Near field communication, personal digital assistant (PDA), and other features.
![Page 4: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/4.jpg)
Top 10 mobile os• Symbian OS – Nokia’s Cell Phone operating system• Android OS – Google’s free, open-source cellphone operating system• iPhone OS (iOS ) – Apple’s mobile operating system• BlackBerry OS – Proprietary mobile operating system, developed by
Research In Motion for its BlackBerry• Windows Phone 7 ( Windows Mobile ) – Mobile operating system
developed by Microsoft• Palm OS (Garnet OS)- mobile operating system initially developed by
Palm• Palm webOS – Mobile operating system from HP/Palm• Bada - Mobile operating system developed by Samsung Electronics• Maemo OS – from Nokia (open source, GPL)• MeeGo OS – from Nokia and Intel (open source, GPL)
![Page 5: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/5.jpg)
![Page 6: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/6.jpg)
Android, Blackberry and J2ME uses Java Language for their development but their applications are not portable because of different hardware, SDK and API.
Windows Phone 7 requires Windows Operating system for its development, the Visual Studio (only supported IDE for Windows Phone) and Emulator also works only in Windows environment. C# is the language of Windows Phone 7 which is not used by any other platform.
iPhone requires Macintosh Operating System and XCode is the IDE for iPhone. Objective C is used for the development of iOS
![Page 7: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/7.jpg)
![Page 8: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/8.jpg)
Native vs hybrid vs webmobile Application
Application Development For mobile Devices
![Page 9: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/9.jpg)
![Page 10: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/10.jpg)
Native app
• A native application works only on the platform for which it was created
• Native apps were originally developed by Apple, which had various programs built in Objective C to run specifically on their mobile OS. Later, Android developed their native apps in Java, which worked only on the Android platform.
![Page 11: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/11.jpg)
Mobile web apps
• Web Applications – Designed to Operate on Multiple Platforms
• Web apps, however, do not connect with native apps and cannot make use of APIs or native hardware features like cameras and microphones. Consequently, many companies are reluctant to fully convert to HTML 5.
![Page 12: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/12.jpg)
Mobile hybrid app• A Hybrid app is a native app operating within a
web browser
• It provides the same functionality and efficiency for the user, but saves the developer from the tedious process of creating multiple native apps for a single project
• Industry experts predict HTML5 will become more prevalent because of its versatility and efficiency
![Page 13: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/13.jpg)
Mobile Web Development javascript frameworks
• jQuery Mobile jQuery Mobile, a framework that will help you rapidly and confidently develop mobile app user interfaces across popular mobile device platforms like iOS and Android, is perhaps the most popular project out there.
![Page 14: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/14.jpg)
Mobile Web Development javascript frameworks
• Titanium Mobile This powerful and robust mobile web development framework allows you to use your existing HTML, CSS and JavaScript knowledge to make native-like mobile apps for iOS and Android.
• M-Project The-M-Project is another solid JavaScript framework that takes advantage of new HTML5 features for easier and better mobile app development.
The framework follows the popular model-view-controller (MVC) software architecture pattern, which is a huge selling point for many developers.
![Page 15: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/15.jpg)
PhoneGap• PhoneGap is opensource mobile development
framework to build mobile application using javascript,HTML5 ,and CSS3.
• The resulting application will by hybrid
• Neither it would be native nor it is web based.
![Page 16: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/16.jpg)
Mobile Web Development javascript frameworks
• DHTMLX Touch • DHTMLX Touch, a free HTML5/JavaScript
framework optimized for touchscreen devices, brings you the ability to craft beautiful mobile web apps quickly.
• The DHTMLX Touch UI Designer is a visual editor for building mobile user interfaces, and it’ll help you construct top-notch UIs with minimal coding
![Page 17: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/17.jpg)
javaScript libraries for mobile web development
• jQTouch: a jQuery plugin specifically for Android and iOS devices.
• jqpad: a web development framework built and optimized for iPad development.
• iUI: a user interface framework for making iPhone-like web apps.
• Sencha: an HTML5 mobile web development framework (suggested by Steven Roussey)
![Page 18: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/18.jpg)
Native Apps
Android
![Page 19: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/19.jpg)
Android
• Android is an open source software stack that includes the operating system,middleware and the key mobile applications along with a set of API libraries.
![Page 20: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/20.jpg)
Android• A free open source operating system for mobile
devices• An open source development platform for
creating mobile applications.
• Devices, particularly mobile phones, that run the android operating system and the applications created for it.
![Page 21: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/21.jpg)
What is Android• A software platform and operating system for mobile devices
• Based on the Linux kernel
Founded by OHA but goggle leads the project
• Possibility to write applications in other languages and compiling it to ARM native code (support of Google? No)
• Unveiling of the Android platform was announced on 5 November 2007 with the founding of OHA
![Page 22: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/22.jpg)
Android• Android devices comes in all shapes and sizes
– Smartphones– Tablets– E-reader devices– Netbooks– Mp4 Players– Internet TVs
![Page 23: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/23.jpg)
Introduction
• Android is an operating system based on Linux with a Java programming interface.
• The Android Software Development Kit (Android SDK) provides all necessary tools to develop Android applications. This includes a compiler, debugger and a device emulator, as well as its own virtual machine to run Android programs.
• Android is officially guided by the Open Handset Alliance. In reality Google leads the project.
• Android allows background processing, provides a rich user interface library, supports 2-D and 3-D graphics using the OpenGL libraries, access to the file system and provides an embedded SQLite database.
![Page 24: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/24.jpg)
Open handset alliance• The Open Handset Alliance (OHA) is a consortium of 84
[ firms to develop open standards for mobile devices
• Welcome to the Open Handset Alliance™, a group of 84 technology and mobile companies who have come together to accelerate innovation in mobile and offer consumers a richer, less expensive, and better mobile experience. Together we have developed Android™, the first complete, open, and free mobile platform.
![Page 25: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/25.jpg)
introduction• What is the Open Handset Alliance (OHA)?
It's a consortium of several companies
![Page 26: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/26.jpg)
History of AndroidThe OHA was established on 6 November 2007, led
by Google with 34 members including mobile handset makers, application developers, some mobile carriers and chip makers. Android, the flagship software of the alliance, is based on an open source license and competes against mobile platforms from Apple, Microsoft, Nokia (Symbian), HP (formerly Palm), Research In Motion, and Samsung Electronics (bada).
![Page 27: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/27.jpg)
What a Desserts (:-
![Page 28: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/28.jpg)
Android Stack
![Page 29: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/29.jpg)
Android StackAndroid operating system is like a cake consisting of various layers. Each layer has its own characteristics and purpose.Linuix,native librariesDalvik
![Page 30: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/30.jpg)
Android Application Development Process
![Page 31: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/31.jpg)
How mobile application runs
![Page 32: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/32.jpg)
The APK• An application is a single APK (application package) file. An APK file
roughly has three main components. It consists of all your Dalvik executable code (Java code compiled automatically to Dalvik executable) plus all your resources (everything that is not code, such as images, layouts, etc.). Additionally, it may contain some native code as well.
Dalvik executable: this is all your Java source code compiled down to Dalvik executable. This is the code that runs your application.
• Resources: resources are everything that is not code. Your application may contain number of images, audio/video clips, as well as numerous XML files describing layouts, language packs, and so on. Collectively, these items are resources.
• Native libraries: optionally, your application may include some native code, such as C/C++ libraries. These libraries could be packaged together with your APK file.
![Page 33: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/33.jpg)
Intro to development framework
• Android applications are written with java as programing langurage but executed by a custeom virtual machine called Dalvik rather than by a java VM.
• Each android application runs in a separate process with in its own Dalvik instance ,relinquishing all responsibility for memory and process management to the Android run time,which stops and kills process as necessary to manage the resources
![Page 34: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/34.jpg)
continued• Dalvik and android run time sits at the top of
the linux kernel that handles the lowlevel hardware interaction,including the drivers and memory management ,while a set of APIs provides access to all the underlying services ,features and hardware.
![Page 35: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/35.jpg)
Installation
![Page 36: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/36.jpg)
• Step 1
• To get started you need to download and install the following
• The Android SDK• Java Development kit ( 6)• You can download jdk 6.0 from herehttp://www.oracle.com/technetwork/java/javase/downloads/index.html
![Page 37: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/37.jpg)
(Step 2)Download and installing SDK • Android development home pagehttp://developer.android.com/sdk/index.html
You need atleast on SDK platform ,you can do this ,you can do this by on Windows by running SDK Setup.exe.
![Page 38: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/38.jpg)
• Step 3:-You have to download eclipse with ADT plug-inTo download the eclipse http://www.eclipse.org/downloads/
![Page 39: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/39.jpg)
Using the eclipse plugin
The ADT plugin for elipse simplifies your
Android development by integrating the
development tools directly into IDE,
![Page 40: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/40.jpg)
Installing ADT Plug-in
![Page 41: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/41.jpg)
![Page 42: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/42.jpg)
If you are behind a firewall (such as a IBA firewall), make sure that you have properly configured your proxy settings in Eclipse. In Eclipse, you can configure proxy information from the main Eclipse menu in Window >Preferences > General > Network Connections.
![Page 43: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/43.jpg)
Window > Preferences> Android modify your ADT preferences in Eclipse to point to the Android SDK directory:(very important)
![Page 44: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/44.jpg)
Create Android Virtual Device(AVD)
![Page 45: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/45.jpg)
Creating your first Android Application
![Page 46: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/46.jpg)
![Page 47: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/47.jpg)
![Page 48: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/48.jpg)
![Page 49: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/49.jpg)
![Page 50: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/50.jpg)
![Page 51: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/51.jpg)
![Page 52: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/52.jpg)
![Page 53: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/53.jpg)
![Page 54: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/54.jpg)
![Page 55: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/55.jpg)
The template “Iba_World, created by the wizard overrides the onCreate method to call the setContentView,which lays our her interface by inflating a layout resource.
![Page 56: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/56.jpg)
The resource of an android project are stored in res folder of your project hierarchy,which includes drawables,layouts,values.The ADT Plugin interprets these resources to provide design time access to them through R variable
![Page 57: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/57.jpg)
![Page 58: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/58.jpg)
Defining your UI in XML and inflating it is the preferred way of implementing your user interfaces, as it neatly decouples your application logic from your UI design.To get access to your UI elements in code ,you add identifier attributes to them in the XML definition.You can then use the findViewById method to return a reference to each nameditem.
![Page 59: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/59.jpg)
TextView text = (TextView) findViewById(R.id.myTextView);
How to access it into the code
![Page 60: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022081604/5681694e550346895de0ec90/html5/thumbnails/60.jpg)
Quiznext class