Android Practical Questions
Android Practical Questions
Android Practical Questions
Activities are one of the fundamental building blocks of apps on the Android platform. They serve
as the entry point for a user's interaction with an app, and are also central to how a user
navigates within an app (as with the Back button) or between apps (as with the Recents button).
What is the APK format ?
What is An Intent ?
An intent is an abstract description of an operation to be performed. It can be used
with startActivity to launch an Activity, broadcastIntent to send it to any
interested BroadcastReceiver components,
and startService(Intent) or bindService(Intent, ServiceConnection, int) to
communicate with a background Service.
What is an explicit Intent ?
Explicit intents specify the component to start by name (the fully-qualified class name).
You'll typically use an explicit intent to start a component in your own app, because you
know the class name of the activity or service you want to start. For example, you can start a
new activity in response to a user action or start a service to download a file in the
background.
Implicit intents do not name a specific component, but instead declare a general action to
perform, which allows a component from another app to handle it. For example, if you want
to show the user a location on a map, you can use an implicit intent to request that another
capable app show a specified location on a map.
As with ADT, support for the Ant tool for building from the command line has
ended. Gradle is now the supported method of building Android apps.
A client, which sends commands. The client runs on your development machine. You can invoke
a client from a command-line terminal by issuing an adb command.
A daemon (adbd), which runs commands on a device. The daemon runs as a background
process on each device.
A server, which manages communication between the client and the daemon. The server runs
as a background process on your development machine.
The dalvik VM relies on the Linux Kernel for the underlying functionality like threading
and memory management.
Libraries: Android includes C/C++ libraries used by components of the android system. These
librairs are exposed by the application framework.
System C library - a BSD-derived implementation of the standard C system library
(libc) for the Linux platform devices.
Media Libraries - It is based on Packet Video's "OpenCORE". These libraries support
playback and recording of many popular audio and video formats, as well as static image files,
including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG
Surface Manager - manages access to the display subsystem and seamlessly composites
2D and 3D graphic layers from multiple applications
LibWebCore - a modern web browser engine which powers both the Android browser
and an embeddable web view
SGL - the underlying 2D graphics engine
3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either
hardware 3D acceleration (where available) or the included, highly optimized 3D software
rasterizer.
FreeType - bitmap and vector font rendering
SQLite - a powerful and lightweight relational database engine available to all
applications
Application Framework: Android allows applications with rich content to be developed by
proving all the core libraries through the application framework. Developers can access the
device hardware, location information, set alarms and many more extensive features because of
this ability.
Underlying the framework are some of the services namely
Views
Content Providers
Resource manager
Notification manager
Activation manager
Applications: Android comes with some of the standard applications like Contacts,
calendar,maps, browser, sms etc. All apps are written in java.
What does the intent filter do in android ?
<intent-filter android:icon="drawable resource"
android:label="string resource"
android:priority="integer" >
. . .
</intent-filter>
specifies the types of intents that an activity, service, or broadcast receiver can respond to. An
intent filter declares the capabilities of its parent component what an activity or service can do
and what types of broadcasts a receiver can handle. It opens the component to receiving intents
of the advertised type, while filtering out those that are not meaningful for the component.
In the event that a matching intent is detected, the Android runtime system will
automatically start up the broadcast receiver before calling the onReceive() method.