Introduction and architecture Flashcards
What is Android?
Googles open and free software stack that includes:
- OS Kernel
- System Libraries
- Application Framework
- Key applications for use on Android mobile devices
What is the Android SDK?
Android Software Development Kit contains the tools and packaged for creating android applications.
From innermost to outermost, what are the 5 layers of the Android platform architecture?
Linux Kernel
HAL
C/C++ Libraries and Android Runtime Environment
Java API Framework
System Applications
What is the role of the Linux Kernel in Android?
Security; process and low level memory management; File and network IO; Hardware drivers; Power Management.
What is the role of the Hardware Abstraction layer (HAL) in Android?
Interfaces the hardware components to the Java API Framework. Each hardware component has 1 interface, and each interface is implemented by one or more libraries. Thus, enabling developers to interact with the hardware. For example, Audio, Camera, Sensors etc.
What type of processes are native C libraries used for? What are some of the responsibilities that Android Runtime takes care of?
Used for intensive, computationally heavy processes. Native C libraries include Webkit, OpenGL, SQLite.
Android Runtime is the android runtime environment that includes classes, app lifecycle, unit testing etc.
What is the role of the Java API Framework layer in Android?
Promotes and enables the reuse of system components and services.
What is the role of the System Applications layer in Android?
Any of the core applications that android provides. For example, calendar, email, browser, camera etc.
How does Android Runtime work?
- Program is written in Java
- Java code is converted to Bytecode
- Bytecode is converted to DEX Bytecode files
- DEX Bytecode files are input into the Android Runtime Environment
- ART outputs the executable files, which are specifically optimised for devices with constraints on memory and speed.
Where are the application resources kept within the project strcture?
In the res folder
What is the R class? What is it an ancestor to?
Exists solely to link resources to the Java code.
It is an ancestor of all files in the res folder.
How does accessing valued of the R class differ between the doing so in Java code and doing so through XML?
R.string.hello -> Java code
@string/hello -> XML
What are the 4 application components?
Activity, Service, Broadcast Receiver, Content Provider.
Define the Activity component…What must be done before they can be used?
Provides points of interaction for the user.
Each activity is a subclass of Activity.
GUI widgets are implemented within Activities.
They must be registered with the Applications manifest before they are used.
Define the Services component…
- Consists of long running processes that take place in the background.
For example, playing music or the reminders app. - Services usually run on their hosting processes thread.