Professional Documents
Culture Documents
Ans:
- Android is an opensource and freely available software to manufacturers for
customization.
- There are no fixed hardware and software configurations.
- There are a lot of mobile applications that can be chosen by the consumer.
- It provides many interesting features like weather details, opening screen, live
RSS (Really Simple Syndication) feeds etc.
- However, Android itself supports the following features:
Storage: Uses SQLite, a lightweight database, for data storage.
Connectivity: Supports GSM/EDGE, CDMA, Bluetooth, Wi-Fi, etc.
Messaging: Supports both SMS and MMS.
Web Browser: Based on the opensource WebKit, together with Chromes VB
JavaScript engine.
Ans:
- res stands for resources. Resources stands for small components that are stand-
alone i.e. drawable or the layout.
- Resource folder is the most important folder because it contains all the non-
code sources like images, XML layouts, UI strings for our android application.
- res/drawable folder:
- It contains the different type of images used for the development of the
application. We need to add all the images in drawable folder for the
application development.
- res/layout folder:
- Layout folder contains all XML layout files which we used to define the user
Interface of our application. It contains the activity_main.xml file.
- res/midmap folder:
- This folder contains launcher.xml files to define icons which are used to show
on the home screen. It contains different density type of icons depends upon
the size of the device such as hdpi, mdpi, xhdpi.
- res/values folder:
- Values folder contains a number of XML files like strings, dimens, colors and
styles definitions. One of the most important files is strings.xml file which
contains the resources.
3. Explain the lifecycle of Android Activity Lifecycle Events.
Ans.
- By the help of activity, you can place all your UI components or widgets in a
single screen.
- The 7-lifecycle method of Activity describes how activity will behave at different
states.
5 Layer Architecture
o 1 - Linux Kernel – Kernel used to get work done by hardware. Device driver +
Memory management + Process management.
o 2 – Libraries: contains pre-written codes or functions. Libraries are Some logical
instructions that we need for he kernels to do C, C++, Graphics, Interface through
Java, SQL Lite Libraries
o 3 - Application Framework – API Interface, Activity manager.
o 4 – Applications – Present in the system.
o 5 – Android Runtime – Dalvik Virtual Machine (DVM)+Core Libraries.
Dex files
Compact and efficient than class files
Limited memory and battery power.
6. Write a specific XML & Java code for the following- (3/4/6) 1.
Listview 2. Radiobutton 3. Textview 4. DatePicker 5. TimePicker
- 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.
- This is the required xml file for all the android application and located inside the
root directory.
10. Explain Logcat structure and its importance in details.
11. Write the steps of hello world program
12. Define Intent. State and explain in brief the types of intents with
example. Write a code to explain it.
Ans.
Types :
1. Implicit Intent:
- Implicit Intent doesn't specifiy the component. In such case, intent provides
information of available components provided by the system that is to be invoked.
For example, you may write the following code to view the webpage.
Intent intent=new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.javatpoint.com"));
startActivity(intent);
2. Explicit Intent
- Explicit Intent specifies the component. In such case, intent provides the external
class to be invoked.
- For example:
Intent i = new Intent(getApplicationContext(), ActivityTwo.class);
startActivity(i);