Android is an open source, Linux based OS, optimized and used for mobile devices. Other Devices include tablets, Cameras, set-top-boxes and laptops etc.
Architecture:
Its a layered architecture. Libraries and drivers as abstraction layer and framework and apps as top layers.
App developer has access to all the APIs.
1. Apps
2. Framework
3. Libraries.
---Android Run-time
4. Linux Kernel.
Android Apps:
Apps are developed in Java. Eclipse ID + ADT (Android Development Toolkit) plugin is for app development. ADT also cares about libraries, packages and emulation of android apps.
Develop the app and archive the code, resources, etc into a .apk (Android Package) file.
Run this file on Android device, or virtual device.
Manifest.xml is a major component of android pp. It allows to declare permissions required by the app.
Other things in this file - components of app, minimum API level, h/w and s/w features used, and API libraries linked, etc.
Android Framework:
Android App have 4 components:
1. Activity
2. Service
3. Content Providers
4. Broadcast Receivers.
Activity is the UI that user interacts with. As if he is performing an activity E.g in Music Player App, the Player screen and the Songs list screen are two activities. Activities interact with each other in an Application via Intents e.g. to pass on data, info, etc. Good thing about activities is that App1 can invoke Activity residing inside of App2. Now not all part of an application is UI. There are things to be done in background as well e.g. retrieving data over network or updating something. Services does the background stuff. It doesn't bother UI thread. It performs its stuff, and goes away. Notification can be invoked when a service finishes. Next thing an application need to complete itself is the data that it holds. Data could be accessed from some source like database or files. Content Providers does the task of accessing data from a source. Content Providers work as URIs. Now the application seems complete, but if it needs to communicate with the framework or the system OS? E.g. battery is low or screen lock event occurs. Broadcast Receivers allow this to happen. The system broadcasts these events and the Receivers (the app) receive it and perform appropriate action. This completes the Android Framework.
Architecture:
Its a layered architecture. Libraries and drivers as abstraction layer and framework and apps as top layers.
App developer has access to all the APIs.
1. Apps
2. Framework
3. Libraries.
---Android Run-time
4. Linux Kernel.
Android Apps:
Apps are developed in Java. Eclipse ID + ADT (Android Development Toolkit) plugin is for app development. ADT also cares about libraries, packages and emulation of android apps.
Develop the app and archive the code, resources, etc into a .apk (Android Package) file.
Run this file on Android device, or virtual device.
Manifest.xml is a major component of android pp. It allows to declare permissions required by the app.
Other things in this file - components of app, minimum API level, h/w and s/w features used, and API libraries linked, etc.
Android Framework:
Android App have 4 components:
1. Activity
2. Service
3. Content Providers
4. Broadcast Receivers.
Activity is the UI that user interacts with. As if he is performing an activity E.g in Music Player App, the Player screen and the Songs list screen are two activities. Activities interact with each other in an Application via Intents e.g. to pass on data, info, etc. Good thing about activities is that App1 can invoke Activity residing inside of App2. Now not all part of an application is UI. There are things to be done in background as well e.g. retrieving data over network or updating something. Services does the background stuff. It doesn't bother UI thread. It performs its stuff, and goes away. Notification can be invoked when a service finishes. Next thing an application need to complete itself is the data that it holds. Data could be accessed from some source like database or files. Content Providers does the task of accessing data from a source. Content Providers work as URIs. Now the application seems complete, but if it needs to communicate with the framework or the system OS? E.g. battery is low or screen lock event occurs. Broadcast Receivers allow this to happen. The system broadcasts these events and the Receivers (the app) receive it and perform appropriate action. This completes the Android Framework.
No comments:
Post a Comment