Mobile Programming Exam Guide
Mobile Programming Exam Guide
Developing an application that requires very high performance and direct access to specific hardware features is better served by native development because native development provides optimal performance and full access to device-specific APIs. Native development allows the application to be closely integrated with the operating system, enabling more efficient use of device resources and access to specific functionalities that cross-platform solutions might not fully support .
The Android Runtime (ART) is a key component of the Android architecture that executes applications on Android devices. ART compiles bytecode into native machine code at the time of installation, significantly improving the performance of applications compared to the previous Dalvik runtime, which relied on just-in-time compilation. This ahead-of-time compilation process reduces the execution time of applications, leading to faster runtime performance and better battery efficiency .
A mobile device refers to any portable computing device that can perform tasks such as communication, access to internet, and running applications, such as a smartwatch. A mobile terminal typically refers to a device used to interface with and perform tasks related to specific functions, often lacking the broader capabilities of a general computing device, such as a GPS unit .
The purpose of enabling USB debugging on a physical Android device is to allow the device to communicate with a computer so that Android applications can be developed and tested directly on the device. To enable USB debugging, navigate to the device's 'Settings,' select 'About phone,' tap 'Build number' several times to unlock Developer Options, go back to settings, open 'Developer Options,' and then toggle 'USB debugging' to enable it .
To create a new Android Virtual Device (AVD) using the AVD Manager, first open the AVD Manager from Android Studio. Click on 'Create Virtual Device,' select a hardware profile that matches your intended use, choose a system image for the Android version you want to emulate, and configure hardware properties before finishing the setup. The primary purpose of an AVD is to simulate a physical Android device on your computer, allowing for application testing and development without needing actual device hardware .
The use of resolveActivity() with implicit intents in Android is significant because it checks whether there is an application that can handle the intent before launching it. This helps prevent the application from crashing due to the absence of an appropriate application for performing the requested action, thus ensuring a more robust and user-friendly experience .
The 'onPause()' method in the Android Activity lifecycle is called when the system is preparing to enter a new activity, which means the current activity is partially obscured. It's important for saving any changes to persistent data and stopping animations or other visual changes that may consume CPU. The 'onStop()' method is called when the activity is no longer visible to the user, which is a signal to perform heavier shutdown operations, such as releasing resources that are not needed while the activity is not visible .
The Hardware Abstraction Layer (HAL) in Android architecture provides a standard interface for the Android framework to interact with device hardware. It acts as a bridge between the hardware-specific software and the rest of the operating system, ensuring that the Android system can use the hardware features of a device consistently across different device models .
An explicit intent is used when you want to start a specific component or service and you know exactly which class to target, such as starting a particular Activity within your own app. For instance, navigating from a main menu Activity to a settings Activity in the same application would use an explicit intent. An implicit intent is used when the action is more general and can be handled by multiple applications. An example would be sharing text via any available app that supports text sharing. Implicit intents rely on the system to determine the best handler for the request, unlike explicit intents that specify the exact target .
Two popular cross-platform mobile development frameworks are Flutter and React Native. Flutter primarily utilizes the Dart programming language, while React Native uses JavaScript as its primary language .