Untitled 2
Untitled 2
By Mbogo Njoroge
1 2
5 6
1
10/28/2021
Android S/W Stack – The App Framework Layer The Features of the App Framework
Feature Role
• Enabling and simplifying the reuse of components Notificatio Enabling all applications to display customer
n Manager alerts in the status bar
Developers have full access to the same framework
APIs used by the core applications.
Activity Managing the lifecycle of applications and
Users are allowed to replace components. Manager providing a common navigation backstack
7 8
Android S/W Stack – The Libraries Layer Android S/W Stack – The Runtime Section
• Core Libraries
Providing most of the functionality available in the core libraries
of the Java language
• Including a set of C/C++ libraries used by components of APIs
the Android system Data Structures
Utilities
• Exposed to developers through the Android application File Access
framework Network Access
Graphics
9
Etc 10
2
10/28/2021
Advantages of android
Android S/W Stack – The Linux Kernel Layer i. open platform and free. So many manufacturers that can design
a variety of software is loaded on the Android system.
Relying on Linux Kernel 2.6 for core system services iii. If you have a phone with Android consistently then you can
download and install several free programs for Android. You can
Memory and Process Management see in the Android Market through applications based on
Network Stack Android, Google Chrome.
Driver Model
iv. With Google Chrome you can open many windows at once.
Security
Many Android applications have been, until April 2011 has
Providing an abstraction layer between the H/W and the rest of the S/W sta reached 250,000 applications for Android. With the support of
ck many applications, the user can change the screen display.
Android phones can also function as a router to share Internet.
13 14
Disadvantages of android
i. Android Linux-based system, so as to modify
Android, the user must know the commands on the Android Studio Application Fundamentals
Linux system, and should log on as administrator.
Goal Applications
• Understand applications and their components • Written in Java or in Kotlin languages (it’s possible
• Concepts to consider involves: to write native code – will not cover that here)
– activity, • Good separation (and corresponding security)
– service,
from other applications:
– Each application runs in its own process
– broadcast receiver,
– Each process has its own separate VM
– content provider,
– Each application is assigned a unique Linux user ID –
– intent, by default files of that application are only visible to
– Android Manifest that application (can be explicitly exported)
17 18
3
10/28/2021
19 20
23 24
4
10/28/2021
25 26
Intent Filters
Android Manifest
• Its main purpose in life is to declare the components to the
system: • Declare Intents handled by the current application (in the
AndroidManifest):
<?xml version="1.0" encoding="utf-8"?>
<manifest . . . > <?xml version="1.0" encoding="utf-8"?>
<manifest . . . >
Shows in the
<application . . . > <application . . . >
<activity android:name="com.example.project.FreneticActivity"
Launcher and
is the main
<activity android:name= android:icon="@drawable/small_pic.png"
android:label="@string/freneticLabel" activity to
"com.example.project.FreneticActivity" ... >
<intent-filter . . . >
start
android:icon="@drawable/small_pic.png" <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
android:label="@string/freneticLabel" </intent-filter>
<intent-filter . . . >
... > <action android:name="com.example.project.BOUNCE" />
<data android:mimeType="image/jpeg" />
</activity> <category android:name="android.intent.category.DEFAULT" />
</intent-filter>
... </activity>
...
</application> </application> Handles JPEG
</manifest> images in
</manifest> some way
27 28
29 30
5
10/28/2021
6
10/28/2021
TextEdit
Button
37 38
Activity2
*******
Login Intent
Called when the Activity Login
is dismissed.
41 42
7
10/28/2021
Multiple choices
might be available
Activity2
to the user! Starting Destroyed
}
Activity1
Intent- onCreate()
View Filters onDestroy()
Activity2 onStart()
Running
Implicit Intent (on background)
43 44
45 46
8
10/28/2021
49 50
<uses-permission android:name=“android.permission.INTERNET"
51
/> 52