18-04-2014, 03:03 PM
Activity manager ?
Activity manager.pptx (Size: 309.95 KB / Downloads: 15)
This manages the activity’s lifecycle or in general, an application’s life cycle .
Usually a class in android framework
Has several nested subclasses
Memoryinfo,ProcessErroStateInfo, RecentTaskInfo, RunningAppProcessInfo, RunningServiceInfo, RunningTaskInfo
For ex: if BT, Camera, Email, Contact application are running together in device, then their lifecycle will be managed by Activity manager and Activity manager will decide , in which state of their lifecycle these apps should be.
Application?
Android apps are written in Java
(Manifest file + resource file + Java code), compiled by android SDK creates an archive (.apk) file.
This .apk file can be installed on android device and is considered to be one android application.
Once installed , an app run in its own security sandbox, runs in own linux process and run in its own VM(virtual machine).
By default, system assigns each application a unique linux user ID
To conserve system resources, it’s possible to arrange for two application to share process, VM and ID, by providing privileges to other application for the resources of one app. These privileges for files are set by system.
For ex: SMS app can ask camera app to capture and thus share a pic
An app can have several entry points, each component can be one single entry point.
Activity?
1. Any window, form or single screen (user interface). This is a single focused thing which a user can do. Activity class takes care of creating window for you in which UI (buttons, lists, input boxes) is placed
2. For ex: Camera app has one activity to capture pic, another for settings. Email app has one activity for showing new mails, other for composing mail, and another for reading mails
3. Although above activities work together to give a cohesive user experience but each one of them is independent from other and can be start by a different app (if current app allow it)
4. An activity is an important part of application’s overall lifecycle.
Task
Even though the activities may be from different applications, Android maintains seamless user experience by keeping both activities (e.g. SMS and camera ) in the same task
A task is a collection of activities that users interact with when performing a certain job. For ex: when camera app is opened from SMS app, then whole job is to capture and share the pic, so this is one task.