Unit 1: Introduction to Mobile Application Design & Development
1.1 The Business Value of Mobile Applications
- Transformative Nature: Mobile devices provide new business possibilities as they are highly mobile computing platforms equipped with built-in sensors to interact with their environment.
- Customer Reach: Because smartphones are almost always within reach, they serve as a direct link to customers, supporting brand loyalty and awareness.
- Redesigning Business Processes: Mobile technology enables businesses to redesign and re-examine their products and processes to achieve potential strategic advantages.
- Monetization Models:
- One-time fees
- Advertisements
- In-app purchases (IAP)
- Subscriptions
- Direct monetization or business consulting through app store distribution.
1.2 Evolution of Mobile Phone Hardware
- Motorola DynaTAC 8000X (1983): The first mobile phone. It weighed 0.8 kg, had a 30-minute battery life, and cost $4,000 USD.
- GSM Network Era (1991): The first GSM network launched in Europe, allowing cross-border communication. The Orbitel TPU 900 was the first GSM phone, featuring a digital display and retractable antenna.
- Siemens S10 (1997): First phone with a color display (supported four colors). Included a vibrate alert and stored up to 140 contacts.
- Sharp J-SH04 (2000): First camera phone (0.11 megapixels), launched in Japan, featuring an infrared port and a basic web browser. The Sony Ericsson T68i (2002) was the first camera phone in the Western market, utilizing a clip-on camera accessory.
- IBM Simon Personal Communicator (1992): The first smartphone. It featured a touchscreen, email, fax, calendar, and apps, though it only sold about 50,000 units.
- BlackBerry 5810 (2002): The first widely popular smartphone, offering a physical QWERTY keyboard, email, web browsing, and instant messaging.
- Apple iPhone (2007): Revolutionized the industry with its sleek design, multi-touch interface, App Store, 2 megapixel camera, Wi-Fi, Bluetooth, and GPS.
- HTC Dream / T-Mobile G1 (2008): The first Android phone. It featured a slide-out keyboard, a trackball, integrated Google services, and a 3.2 megapixel camera.
- Samsung Galaxy Fold (2019): First phone with a foldable display, featuring a 7.3-inch screen when unfolded, a 4.6-inch screen when folded, and six cameras.
1.3 App Design Issues and Considerations
1.3.1 Operating System Design Issues & Multitasking
- Mobile operating systems are not true multitasking environments like traditional computers; only one app can be active in the foreground at a time.
- When interrupted (e.g., by a phone call), the active app is placed in the background.
A. The Android Life Cycle
onCreate(): Triggered when the user taps the app icon. Initializes variables, loads layouts, and prepares settings.onStart(): Executed immediately after creation.onResume(): Executed when the activity becomes visible and interactive.onPause(): The first method on the path to destruction. Used to stop services, animations, and store state information.onStop(): Executed when the app is no longer visible.onDestroy(): Executed just before the OS reclaims resources.- Note: Implementing the methods on the path to destruction is recommended but not strictly mandatory.
B. The iOS Life Cycles
iOS splits lifecycle management into App and View (Screen) lifecycles:
- iOS App Life Cycle:
application:didFinishLaunchingWithOptions:: Sets up the operating environment for the entire app (similar to Android'sonCreate()).applicationWillResignActive:: Executed when the app is interrupted (similar to Android'sonPause()).applicationDidEnterBackground:: Executed when the app is no longer visible.
- iOS View Life Cycle (ViewController):
viewDidLoad:: Executed once the view is loaded into memory (runs only once per memory cycle; used to set the initial state).viewWillAppear:: Executed every time the view is about to become visible. Used to load data and activate services.
1.3.2 Screen Size and Orientation Issues
- Users often multitask (e.g., walking or talking) while using apps, requiring designs that facilitate rapid, distraction-free task execution.
- Scrolling Guidelines: Limit both vertical and horizontal scrolling. Horizontal scrolling is not instinctive for most users and should be reserved for elements extending clearly off the screen.
- UI Elements: Keep certain critical interface elements fixed during scrolling to ensure continuous availability.
- Interface Planning: Keep tasks simple and focus on a single set of operations per screen. Divide multi-step tasks into separate, intuitive screens.
1.3.3 Connectivity Issues
- Mobile connectivity is inherently unstable and can drop due to minor physical movements.
- Platform Approaches: Apple mandates user warnings for lost network connections in submitted apps, while Android leaves this warning to developer discretion.
- Asynchronous Data Handling: Network operations should run outside the main thread (asynchronously) to prevent the user interface from freezing.
- UX Strategy: Provide alternative offline tasks and inform users when a requested operation requires currently unavailable data.
1.3.4 Battery Issues
- Unnecessary battery drain negatively affects user reviews and retention.
- Display vs. Code: The screen is the primary source of power draw. Although developers cannot directly control the hardware screen power, efficient code execution minimizes necessary processing time and reduces overall screen-on time.
- Sensor Management: Sensors like GPS, camera, and radio modules draw significant power. They must be activated only when required and turned off immediately after use.
1.3.5 Hardware Issues
- Hardware Availability: Android hardware features vary significantly by manufacturer. While iOS devices are more uniform, minor differences still exist. Tangential components should be avoided to prevent compatibility issues.
- Situational Availability: Certain hardware components rely on external environments (e.g., GPS requires a clear line of sight to satellite signals and may not function reliably indoors).
1.4 Evolution of Mobile Operating Systems
- 1993: PenPoint OS (GO Corp.) and Newton OS (Apple) launch on the first PDAs.
- 1996: Palm OS is released for Palm Pilot PDAs, popularizing personal information management.
- 1998: Symbian OS is created as a joint venture (Nokia, Ericsson, Motorola, Psion) and becomes the dominant smartphone platform in the 2000s.
- 2000: Microsoft rebrands Windows CE as Windows Mobile.
- 2007: iOS is introduced with the first iPhone, introducing touch-centric mobile design.
- 2008: Android is released on the HTC Dream, offering an open-source, Linux-based platform.
- 2009: Palm webOS debuts on the Palm Pre, introducing gesture-based navigation.
- 2010: Windows Phone is launched by Microsoft with a revamped interface.
- 2013: BlackBerry 10 is released as a modernized, gesture-based mobile platform.
- 2015: Samsung introduces Tizen on the Samsung Z1, targeting low-end devices and emerging markets.
- 2017: KaiOS is developed as a fork of Firefox OS, targeting feature phones.
- 2020: Huawei unveils HarmonyOS as a cross-platform operating system for phones, tablets, smart TVs, and IoT.
1.5 Android OS and Architecture
- Created in 2003 by Andy Rubin (initially intended for digital cameras) and acquired by Google in 2005.
- Google launched the Open Handset Alliance (OHA) in 2007 to promote Android as a free, open-source software stack.
- In 2008, the T-Mobile G1 launched running Android 1.0. Major releases are named alphabetically after desserts, up to current versions such as Android 14.
1.5.1 The Android Software Stack (Architecture)
The Android platform consists of six major layers:
- The Linux Kernel: The foundation of the platform. It handles low-level memory management, process threading, basic security features, and allows manufacturers to write standard hardware drivers.
- Hardware Abstraction Layer (HAL): Exposes physical hardware capabilities (such as the camera or Bluetooth module) to the higher-level Java API framework through modular library interfaces.
- Android Runtime (ART): Starting from Android 5.0 (API 21), each app runs in its own process with its own ART instance. ART executes DEX files (compiled from Java/Kotlin code via compilers like
d8), which are optimized for low-memory footprints. - Native C/C++ Libraries: Many system components (including ART and HAL) are built using native C/C++ libraries. The platform exposes these functionalities to apps via Java framework APIs.
- Java API Framework: The entire feature set of the Android OS is exposed to developers through Java APIs. Key framework components include:
- View System: Used to build user interfaces (lists, buttons, grids, text boxes).
- Resource Manager: Provides access to non-code assets (localized strings, layout files, graphics).
- Notification Manager: Enables apps to display custom alerts in the status bar.
- Activity Manager: Manages the lifecycle of applications and back-stack navigation.
- Content Providers: Allows apps to query or share data securely (such as Contacts database).
- System Apps: Android includes core built-in apps (Email, SMS, browser). Third-party apps can replace these system defaults (excluding specific system settings). System apps also expose services that external developers can invoke (e.g., using the default SMS app to send messages).
1.6 iOS OS and Architecture
- Developed by Apple Inc. exclusively for its hardware (iPhone, iPad, iPod touch).
- Based on Unix, macOS, and Darwin (BSD) operating systems, using Cocoa Touch as its default user interface.
1.6.1 The iOS Architecture Layers
iOS utilizes a strictly layered architecture (ordered from top to bottom):
- Cocoa Touch Layer (Application Layer): Serves as the primary user interface. It manages basic system behavior, supports touch interactions, motion events, and key multitasking infrastructures.
- Media Layer: Enables multimedia features, including graphics, audio, and video technologies.
- Core Services Layer: Houses fundamental system services and frameworks that provide database, network, and file system features.
- Core OS Layer: The lowest-level layer, sitting directly on top of the device hardware. It supports core system services and includes:
- Core Bluetooth Framework
- External Accessories Framework
- Accelerate Framework
- Security Services Framework
- Local Authorization Framework