Mobile Flashcards
What is ubiquitous computing?
- Computing devices become an integral part of the environment, seamlessly integrated with the environment and available anytime and anywhere
- Embedding computing capacity into ordinary items
How do mobile networks work?
- Base station (BS)/access point (AP) connects mobile devices to infrastructure
- Handoff: mobile device change its associated BS
What is the difference between a mobile and a PC?
The difference is the way they put components. Mobiles use System on Chip: a complex integrated that integrates the major functional elements into a single chip or chipset.
What are the benefits of SoC?
- Reduced size
- Lower power consumption
What is the platform architecture for Android?
- Linux Kernel
- Hardware abstraction layer (HAL)
- Native C/C++ libraries, Android Runtime
- Java API framework
- System apps
What does the Linux Kernel provide in Android?
- Hardware drivers
- Security
- Process and Memory management
- File and Network I/O
- Power management, Binder (Inter-Process Communication)
What does the Hardware Abstraction Layer provide in Android?
- Provides standard interfaces that expose device hardware capabilities to the Java API framework
- Consists of multiple library modules, each of which implements an interface for a specific type of hardware component
What does the Native C/C++ libraries provide in Android?
- Webkit (browser engine)
- Media Framework (Video/Audio)
- OpenGL (Graphics engine)
- SQLite (relational database engine)
What does the Android Runtime provide in Android?
- It is an application runtime environment used by the Android OS
- Core libraries (Basic Java classes, App lifecycle, Internet/Web services, Unit testing)
- ART (App written in Java compiled to Java bytecode files, which is converted to DEX bytecode files, which is the input bytecode to ART - designed for devices with constrained memory and speed)
What does the Java API Framework provide in Android?
- Enabling and simplifying the reuse of system components and services
- Developers have full access to the same APIs used by the system applications
What features are included in Java API Framework?
- View system: Builds an application’s UI, including lists, grids, text boxes, buttons, embedded web browser, etc.
- Content Provider: Enables applications to access data from others or to share their own data
- Resource Manager: Provides access to non-code resources (strings, graphics, and layout files)
- Notification Manager: Enables all applications to display customer alerts in the status bar
- Activity Manager: Manages the lifecycle of apps and provides a common navigation backstack
What Applications are provided in Android?
- Email Client
- SMS/MMS
- Calendar
- Maps
- Browser
- Contacts
- Camera
What are some limitations of Android Emulators?
It does not support or only partially supports:
- USB
- Device-attached headphones
- SD card insert/eject
- Bluetooth
- NFC
What are the components of an application?
- Activities: GUI focused on a single thing a user can do
- Services: no visual interface, they run in the background
- Broadcast Recievers: receive and react to broadcasts
- Content Providers: allow data exchange between applications
What are some examples of service components?
- Play music
- Perform file I/O
- Handle networking task
How do broadcast recievers work in an app?
Allow to listen for and respond to an event of interest
What are some examples of app broadcasts?
- System broadcasts: Low battery, power connected, shutdown, etc.
- Customized broadcasts: To notify other apps
- Register to receive specific broadcasts: e.g., SMS message received; call received
What is an intent in Android?
- A messaging object that can be used to request an action from another app component (e.g., activities, services, broadcast
receivers). - It allows a component to communicate with another component (same app or other apps).
What are the three fundamental use cases of an intent in Android?
- Starting an activity
- Starting a service
- Delivering a broadcast
What is an explicit intent in Android?
Specify the component to start by its name (the fully-qualified class name)
What is an implicit intent in Android?
- Not directly specify (name) a component, but instead specify an action to perform.
- Intent filter specifies the type of intents an activity accepts based on the intent’s action, data, and category.
How are application resources stored?
- Images and string should be stored in a res folder
- Place each type of resource in a
specific subdirectory of your
project’s res/directory - You can access them using
resource IDs generated in your
project’s R class.
What is stored in AndroidManifest.xml?
- Package name
- Main activity
- Components (activities, services, broadcast receivers, and content providers)
- Request permissions (network, location,…)
What are the three approaches for creating an activity?
- Traditional approach: separate activity for each screen
- Modern approach: single activity with multiple fragments
- Jetpack compose: single activity architecture, modern UI toolkit, only in Kotlin
What are the 7 callback methods of an activity lifecycle?
- onRestart()
(Lifetime) - onCreate()
- onDestroy()
(Visible) - onStart()
- onStop()
(Interactable) - onResume()
- onPause()
What does onCreate() do?
- Called when Activity is created.
- Initialize the Activity and carry out the functions: Call super.onCreate(); Set content view; Retain references to views; Configure views.