0% found this document useful (0 votes)
9 views36 pages

Lecture 3

The document provides an overview of mobile operating systems, focusing on Android and iOS, including their development environments and application structures. It highlights the advantages and disadvantages of mobile devices, the architecture of Android applications, and the requirements for developing on both Android and iOS platforms. Additionally, it discusses the Android Market, app monetization strategies, and the importance of permissions and app signing in the Android ecosystem.

Uploaded by

bushrachoohan786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views36 pages

Lecture 3

The document provides an overview of mobile operating systems, focusing on Android and iOS, including their development environments and application structures. It highlights the advantages and disadvantages of mobile devices, the architecture of Android applications, and the requirements for developing on both Android and iOS platforms. Additionally, it discusses the Android Market, app monetization strategies, and the importance of permissions and app signing in the Android ecosystem.

Uploaded by

bushrachoohan786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Intro to Android and iOS

The Players
• Android – Open source mobile OS developed by Android Inc
Palo Alto, California in 2003. Based on Linux 2.6 kernel.
Android was developed by the Andy Rubin, Rich Miner, Nick
Sears and Chris White.
• iOS – Apple’s proprietary mobile OS, iPhone, iPod Touch, iPad.
Derived from OS X, very UNIX like
• Symbian – acquired by Nokia 2008
• Windows Phone 7 – Microsoft – Kin, discontinued 6 weeks
after initial launch
• Blackberry OS – RIM (Research in Motion), proprietary OS
Mobile Devices: Advantages

• Always with the user


• Typically have Internet access
• Typically GPS enabled
• Typically have accelerometer & compass
• Most have cameras & microphones
• Many apps are free or low-cost
Mobile Devices: Disadvantages

• Limited screen size


• Limited battery life
• Limited processor speed
• Limited and sometimes slow network access
• Limited or awkward input: soft keyboard, phone
keypad, touch screen, or stylus
• Limited web browser functionality
• Range of platforms & configurations across devices
What is Android
• Android is an open source operating system for
use on mobile devices (cell phones and tablets)
It was created by the company Android Inc at
Palo Alto, California Purchased by the GOOGLE
in AUGUST,2005 for 50 million $.
• Specifically Linux based (2.6 kernel)
• Can be programmed in C/C++ but most app
development is done in Java (Java access to C
Libraries via JNI (Java Native Interface))
• Supports Bluetooth, Wi-Fi, and 3G and 4G
networking
Open handset alliance(oha)
What is OHA?
• It’s consortium of several companies.
• This group of companies are allowed to use
source code of Android and develop applications.
• Reason for Nokia not to develop Android
Mobiles is Nokia is not part of OHA.
What is iOS
• Apple’s mobile OS for phones (iPhone), tablets
(iPad), handhelds (iPod),
• based on BSD(Berkeley Software Distribution)
Unix
• Application programming done in Objective C
• Supports Bluetooth, Wi-Fi, and 3G and 4G
networking
Commonly Used Packages
• User interface controls and widgets
• User interface layout
• Secure networking and web browsing
• Structured storage and relational databases
(SQLite RDBMS)
• 2D and 3D Graphics SGL(Scalable Graphics
Library) and OpenGL
• Audio and visual media support
• Access to optional hardware (GPS)
The Android Software Stack
Android Application Development

Android
Eclipse IDE
SDK

Android
Android
Mobile
Emulator
Device
iOS Application Development

iOS
XCODE IDE
SDK

iOS
iOS
Mobile
Simulator
Device
Android development

Java Source
Android
Manifest
Generated Java .dex Dalvik
Class Compiler File VM
Resource
XML
Android
Libraries
iOS development

Xcode Objective C
Source

Interface .xib file Objective C . Simulator


Builder Compiler or Device

Foundation
Framework
Cocoa Libraries
Android Apps

• Built using Java and new SDK libraries


– No support for some Java libraries like Swing &
AWT
• Java code compiled into Dalvik byte code
(.dex)
– Optimized for mobile devices (better memory
management, battery utilization, etc.)
• Dalvik VM runs .dex files
• Development
process for an
Android app

http://developer.android.com/guide/developing/index.html
Building and running
Compiled resources
(xml files)

Android Debug Bridge

• ADB is a client server program that connects clients on developer machine


to devices/emulators to facilitate development.
• An IDE like Eclipse handles this entire process for you.

http://developer.android.com/guide/developing/building/index.html#detailed-build
Building and Running
Applications Are Boxed

• By default, each app is run in its own Linux process


– Process started when app’s code needs to be executed
– Threads can be started to handle time-consuming
operations
• Each process has its own Dalvik VM
• By default, each app is assigned unique Linux ID
– Permissions are set so app’s files are only visible to that
app
Android Architecture
Publishing and Monetizing

• Paid apps in Android Market, various other markets


• Free, ad-supported apps in Android Market
– Ad networks (Google AdMob, Quattro Wireless)
– Sell your own ads
• Services to other developers
– Ex. Skyhook Wireless (http://www.skyhookwireless.com/)
• Contests (Android Developer Challenge)
• Selling products from within your app
Android Market (Google Play)

– https://play.google.com/store

• Has various categories, allows ratings


• Have both free/paid apps
• Featured apps on web and on phone
• The Android Market (and iTunes/App Store) is great
for developers
• Level playing field, allowing third-party apps
• Revenue sharing
Publishing to Google Play

• Requires Google Developer Account


– $25 fee
• Link to a Merchant Account
– Google Checkout
– Link to your checking account
– Google takes 30% of app purchase price
Android Design Philosophy

• Applications should be:


– Fast
• Resource constraints: <200MB RAM, slow processor
– Responsive
• Apps must respond to user actions within 5 seconds
– Secure
• Apps declare permissions in manifest
– Seamless
• Usability is key, persist data, suspend services
• Android kills processes in background as needed
REQUIREMENTS FOR ANDROID
OS
• Android application development on either
of the following operating systems:
– Microsoft Windows.
– Mac OS X 10.5.8 or later version with Intel
chip.
– Linux including GNU C Library 2.7 or later.
Requirements for Android
Tools
• All the required tools to develop Android
applications are freely available and can be
downloaded from the Web. Following is the
list of software's you will need before you
start your Android application programming.
• Java JDK5 or later version
• Android Studio / Android SDK and Eclipse IDE
for Java Developers (optional) and Android
Development Tools (ADT) Eclipse Plug-in
(optional)
REQUIREMENTS FOR ANDROID
Download Android Studio
• From
http://developer.android.com/sdk/installing/index.
html
System Requirements for Windows
• Microsoft® Windows® 8/7/Vista (32 or 64-bit)
• 2 GB RAM minimum, 4 GB RAM recommended
• 400 MB hard disk space
Requirements for Android
• At least 1 GB for Android SDK, emulator
system images, and caches
• 1280 x 800 minimum screen resolution
• Java Development Kit (JDK) 7
• Optional for accelerated emulator: Intel®
processor with support for Intel® VT-x, Intel®
EM64T (Intel® 64), and Execute Disable (XD)
Bit functionality
INSTALLATION
• Java
1. Visit
http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Install it.
• Android Studio
3. Visit http://developer.android.com/sdk/index.html
4. click the button Download Android Studio.
5. Accept terms, and click Download.
6. Run executable file of setup.
7. Follow the setup wizard to install Android Studio and any necessary SDK
tools.
8. On some Windows systems, the launcher script does not find where Java
is installed. If you encounter this problem, you need to set an
environment variable indicating the correct location.
9. Select Start menu > Computer > System Properties > Advanced System
Properties. Then open Advanced tab > Environment Variables and add a
new system variable JAVA_HOME that points to your JDK folder, for
example C:\Program Files\Java\jdk1.7.0_45
INSTALLATION
10. The individual tools and other SDK packages are saved outside
the Android Studio application directory. If you need to access
the tools directly, use a terminal to navigate to the location
where they are installed. For example:
11. \Users\<user>\sdk\
12. Android Studio is now ready and loaded with the Android
developer tools, but there are still a couple packages you
should add to make your Android SDK complete.
• Run
1. Run Android Studio as Administrator.
2. Before you create new project, click Configure from splash
screen. Click SDK Manager.
3. Don’t select all. In bottom, in Extra section, select Intel x86
Emulator Accelerator.
4. Click Install button.
ANDROID EMULATOR
• The Android SDK includes a mobile device emulator —
a virtual mobile device that runs on your computer.
The emulator lets you develop and test Android
applications without using a physical device.
Limitations
• No support for placing or receiving actual phone calls.
You can simulate phone calls (placed and received)
through the emulator console, however.
• No support for USB connections
• No support for device-attached headphones
• No support for determining network connected state
• No support for determining SD card insert/eject
• No support for Bluetooth
AVD MANAGER
• The AVD Manager provides a graphical user
interface in which you can create and manage
Android Virtual Devices (AVDs), which are
required by the Android Emulator.
Android Studio
• Tools > Android > AVD Manager
OPTIONAL INSTALLATION -
GENYMOTION
• It is a fast third party Android emulator for app testing and
presentation on Windows that can be used instead of the
default Android emulator. In some cases it's as good as or
better than developing on actual devices!
1. Visit https://www.genymotion.com
2. Click Free version. Click Get Genymotion.
3. Create a Genymotion account, sign in.
4. Download and install Genymotion.
• Run Genymotion
1. First time you have to sign in with your credentials. It will
connect with cloud and provide available virtual devices.
2. Add your desired virtual device.
Android Permissions
• All permission of Android’s policy are set at install time and
can’t change until the application is reinstalled.
• Android’s permission only restricts access to components and
doesn’t currently provide information flow guarantees.
• A permission is listed in app’s manifest definition XML file.
• If a public component doesn’t explicitly declare any access
permission, Android permits any application to access it.
• Component A’s ability to access components B and C is
determined by comparing the access permission labels on B
and C to the collection of permission labels assigned to
application A.
Android App Signature
• All Android applications must be signed, but are usually self-
signed
• Why self signing?
– Market ties identity to developer account
– No CA in Google, Google does not have central control
over the app’s signature certificates
– No applications are trusted. No "magic key"

• What does signing determine?


– Author-update
– In signature schemes, the private key is used to sign a app
or message; anyone can check the signature using the
public key.
Permissions Levels

• User can assign permissions to applications at


- normal
– dangerous
– signature
– signatureOrSystem

• http://developer.android.com/guide/developing/b
uilding/index.html#detailed-build

You might also like