Android Assingment Unit 1
Android Assingment Unit 1
Android Assingment Unit 1
• Android is a software package and linux based operating system for mobile devices such
as tablet computers and smartphones.
• It is developed by Google and later the OHA (Open Handset Alliance). Java language is
mainly used to write the android code even though other languages can be used.
• The goal of android project is to create a successful real-world product that improves the
mobile experience for end users.
o Android 1.0
o Android 1.1
o Android 1.5 Cupcake
o Android 1.6 Donut
o Android 2.0 Eclair
o Android 2.2 Froyo
o Android 2.3 Gingerbread
o Android 3.0 Honeycomb
o Android 4.0 Ice Cream Sandwich
o Android 4.1 Jelly Bean
o Android 4.4 KitKat
o Android 5.0 Lollipop
o Android 6.0 Marshmallow
o Android 7.0 Nougat
o Android 8.0 Oreo
o Android 9 Pie
o Android 10
o Android 11
o Android 12
o
o
o
o
o
o
o
o
o
➤ Linux kernel
l Core services (including hardware drivers, process and memory management, security,
network, and power management) are handled by a Linux 2.6 kernel. The kernel also
provides an abstraction layer between the hardware and the remainder of the stack.
Libraries
Running on top of the kernel, Android includes various C/C++ core libraries such as libc
and SSL, as well as:
➤ Graphics libraries that include SGL and OpenGL for 2D and 3D graphics
➤ SSL and WebKit for integrated web browser and Internet security
➤ Core libraries While Android development is done in Java, Dalvik is not a Java VM.
The core Android libraries provide most of the functionality available in the core Java
libraries as well as the Android-specific libraries.
➤ Application layer
All applications, both native and third-party, are built on the application layer by means
of the same API libraries. The application layer runs within the Android run time, using
the classes and services made available from the application framework.
1. onCreate():
2. onStart():
This callback method is called when the activity becomes visible to the
user.
3. onResume():
The activity is in the foreground and the user can interact with it.
4. onPause():
5. onStop():
From the Stopped state, the activity either comes back to interact with
the user or the activity is finished running and goes away. If the activity
comes back, the system invokes OnRestart()
7. onDestroy():
So these are the various methods of the Activity Life Cycle. Now let’s see
the situations where the life cycle methods and states will occur.
1: Firstly, Select Tools > Android > AVD Manager > Click the AVD Manager icon in the
toolbar. Another way to open the AVD Manager directly by the AVD icon in the Tool bar.
2: Android Virtual Device Manager will be opened. After that Click on Create Virtual
Device.
3: After that choose the Category, phone size and choose the pixels according to your
requirement. After this click on Next button.
4: After that choose the SDK Version and Click on Next button. If you have various SDK
Versions like Kitkat, Lolipop and Marshmallow etc in your SDK then you can select one
of them. Here we have only Marshmallow SDK Version. So, we can go with the
Marshmallow SDK Version. Click on the next.
5: After that Enter the AVD Name in Android Virtual Device and Click on Finish button.
Here you can do customization to AVD which you are creating as per your requirement.
Click Finish and new AVD is created.
6: Now again open AVD manager and you will see your newely created AVD (Android
Virtual Device) is added in the list. Here click to Start the Virtual Device as shown in
figure below.
7: After that your AVD will start in Emulator. Now you can run your App in this AVD.
5> Explain Android SDK
IT’s Components
CONTEXT
Intents
Services
As we know the modern JVM is high performance and provides excellent memory
management. But it needs to be optimized for low-powered handheld devices as well.
The Dalvik Virtual Machine (DVM) is an android virtual machine optimized for mobile
devices. It optimizes the virtual machine for memory, battery life and performance.
Dalvik is a name of a town in Iceland. The Dalvik VM was written by Dan Bornstein.
The Dex compiler converts the class files into the .dex file that run on the Dalvik VM.
Multiple class files are converted into one dex file.
The javac tool compiles the java source file into the class file.
The dx tool takes all the class files of your application and generates a single .dex file. It
is a platform-specific tool.
The Android emulator comes with predefined configurations for several Android
phones, Wear OS, tablet, Android TV devices.
o 64-bit processor