0% found this document useful (0 votes)
13 views

1. What is Android qa

The document provides an overview of Android, detailing its components, development environment, data types, and application structure. It explains the use of the Dalvik Virtual Machine, the differences between implicit and explicit intents, and various Android tools and features. Additionally, it covers topics such as permissions, dialog boxes, layouts, and the process of creating bounded services using AIDL.

Uploaded by

jessicadasari.jd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

1. What is Android qa

The document provides an overview of Android, detailing its components, development environment, data types, and application structure. It explains the use of the Dalvik Virtual Machine, the differences between implicit and explicit intents, and various Android tools and features. Additionally, it covers topics such as permissions, dialog boxes, layouts, and the process of creating bounded services using AIDL.

Uploaded by

jessicadasari.jd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 18

**1\. What is Android?

**

* * *

[Android](http://www.credosystemz.com/training-in-chennai/best-android-training-in-
chennai/) is a Software for mobile devices which includes an Operating System,
middleware and some key applications. The application executes within its own
process and its own instance of **Dalvik Virtual Machine**. Many Virtual Machines
run efficiently on a DVM device. **DVM** executes Java languages bytecode which
later transforms into **.dex** format files.

**2\. Why cannot you run standard Java bytecode on Android?**

* * *

Android uses Dalvik Virtual Machine (DVM) which requires a special bytecode. We
need to convert Java class files into Dalvik Executable files using an Android tool
called “dx”. In normal circumstances, developers will not be using this tool
directly and build tools will care for the generation of DVM compatible files.

**3\. What are the different data types used by Android?**

* * *

The data can be passed between many services and activities using the following
data types:

– **Primitive Data Types**: This is used to share the activities and services of an
application by using the command as Intent.putExtras(). This primitive data passes
the command to show the persistent data using the storage mechanism. These are
inbuilt data types that are used with the program. They provide a simple
implementation of the type and easy to use commands.

– **Non-Persistent Objects**: It is used to share complex and non-persistent


objects. These are user-defined data types that are used for short duration and are
also recommended to be used. These types of objects allow the data to be unique but
it creates a complex system and increases the delay.

**4\. What needs to be done in order to set Android development environment where
Eclipse IDE is to be used?**

* * *

Download the Android SDK from Android homepage and set the SDK in the preferences.
Windows > Preferences > Select Android and enter the installation path of the
Android SDK. Alternatively, you may use Eclipse update manager to install all
available plugins for the Android Development Tools (ADT)

**5\. What main components of Android application?**

* * *

- **Activities**: They dictate the UI and handle the user interaction to the
screen.
- **Services**: They handle background processing associated with an application.
- **Broadcast Receivers**: It handles the communication between Applications and
Android Operating system
- **Content Providers**: They handle data and database management stuff.
**6\. Where will you declare your activity so the system can access it?**

* * *

Activity is to be declared in the


[manifest](http://developer.android.com/reference/android/Manifest.html) file. For
example:

> **<manifest> </manifest>**


>
> **<application> </application>**
>
> **<activity** android:name=”.MyTestActivity” **\> </activity>**

**7.** **Can you deploy executable JARs on Android? Which packaging is supported by
Android?**

* * *

No. Android platform does not support JAR deployments. Applications are packed into
Android Package (.apk) using Android Asset Packaging Tool (aapt) and then deployed
on to Android platform. Google provides Android Development Tools for Eclipse that
can be used to generate Android Package.

[![Top 10 Android Tools](http://i2.wp.com/www.bestandroidtrainingchennai.in/wp-


content/uploads/2017/12/Android-Tools.png?w=781)](http://
www.bestandroidtrainingchennai.in/android-blog/android-tools-every-developer-know/)

**8\. Define Android application resource files?**

* * *

As an Android application developer, you can inject files (XML, JSON, JPEG etc)
into the build process and can load them from the code. These injected files are
revered as resources.

**9\. Where can you define the icon for your Activity?**

* * *

Icon for an Activity is defined in the manifest file.

**<activity** android:icon=”@drawable/app\_icon”android:name=”.MyTestActivity”
**></activity>**

**10\. Android application can only be programmed in Java?**

* * *

False. You can program Android apps in C/C++ using NDK .

**11\. Which dialog boxes can you use in you Android application?**

* * *

AlertDialog: an alert dialog box and supports 0 to 3 buttons and a list of


selectable elements.

**ProgressDialog**: an extension of AlertDialog and you may add buttons to it. It


shows a progress wheel or a progress bar.

**DatePickerDialog**: used for selecting a date by the user.

**TimePickerDialog**: used for selecting time by the user.

**12\. What are Dalvik Executable files?**

* * *

Dalvik Executable files have .dex extension and are zipped into a single .apk file
on the device.

**13\. Define Activity application component.**

* * *

It is used to provide interactive screen to the users. It can contain many user
interface components. A typical Android application consists of multiple activities
that are loosely bound to each other. Android developer has to define a main
activity that is launched on the application startup.

**14\. How does Android system track the applications?**

* * *

Android system assigns each application a unique ID that is called Linux user ID.
This ID is used to track each application.

**15\. An Android application needs to access device data e.g SMS messages, camera
etc. At what stage user needs to grant the permissions?**

* * *

Application permission must be granted by the user at install time.

**16\. What does ADT stand for?**

* * *

**ADT** stands for **Android Development Tools** .The Android SDK includes several
tools and utilities to help you create, test, and debug your projects.

**17\. How to get screen dimensions in pixels in Andorid Devices?**

* * *

> _intscreenHeight = getResources().getDisplayMetrics().heightPixels;_


>
> _intscreenWidth = getResources().getDisplayMetrics().widthPixels;_

**18\. What is a Toast Notification?**

* * *

A **toast** notification is a message that pops up on the surface of the window. It


only fills the amount of space required for the message and the user’s current
activity remains visible and interactive. The notification automatically fades in
and out, and does not accept interaction events.
[![Best Coding practices](http://i0.wp.com/www.bestandroidtrainingchennai.in/wp-
content/uploads/2017/12/Best-Coding-practices.png?w=781)](https://
www.credosystemz.com/training-in-chennai/best-android-training-in-chennai/)

**19\. What is the difference between Service and Thread?**

* * *

**Service** is like an Activity but has no interface. Probably if you want to fetch
the weather for example you won’t create a blank activity for it, for this you will
use a Service. It is also known as Background Service because it performs tasks in
background. A Thread is a concurrent unit of execution. You need to know that you
cannot update **UI** from a Thread. You need to use a Handler for this.

**20\. Which dialog boxes are supported by android?**

* * *

Android supports 4 dialog boxes:

- **AlertDialog:** It supports 0 to 3 buttons and a list of selectable elements


which includes radio buttons and check boxes.
- **ProgressDialog**: This dialog box is an extension of AlertDialog and supports
adding buttons. It displays a progress wheel or bar.
- **DatePickerDialog**: The user can select the date using this dialog box.
- **TimePickerDialog**: The user can select the time using this dialog box.

**21\. What do containers hold?**

* * *

- Containers hold objects and widgets in a specified arrangement.


- They can also hold labels, fields, buttons, or child containers.

**22\. Tell us something about activityCreator?**

* * *

An **activityCreator** is the first step for creation of a new Android project.

It consists of a shell script that is used to create new file system structure
required for writing codes in Android IDE.

**23\. What is the difference between a class , a file and an activity in android?
**

* * *

**Class** – Its a compiled form of .Java file . Android finally used this .class
files to produce an executable apk

**File** – It is a block of arbitrary information, or resource for storing


information. It can be of any type.

**Activity**– An activity is the equivalent of a Window in GUI toolkits. It is not


a file or a file type it is just a class that can be extended in Android for
loading UI elements on view.
**24\. What item are important in every Android Project ?**

* * *

These are the essential items that are present each time an Android project is
created:

– AndroidManifest.xml

– build.xml

– bin/

– src/

– res/

– assets/

**25\. Describe the SmsManager class in android.**

* * *

**SmsManager class** is responsible for sending SMS from one emulator to another or
device.

You cannot instantiate this class directly; instead of , You can call the
getDefault method static() to obtain an SmsManager object. Then send the SMS
message using the

**sendTextMessage() method:**

> _SmsManagersms = SmsManager.getDefault();_


>
> _sms.sendTextMessage(“5556”, null, “Hello from careerRide”, null, null);_

**sendTextMessage() method takes five argument.**

– destinationAddress — Phone number of the recipient.

– scAddress — Service center address; you can use null also.

– sentIntent — Pending intent to invoke when the message is sent.

– text — Content of the SMS message that you like to send.

– deliveryIntent — Pending intent to invoke when the message has been delivered.

**26\. How to disable landscape mode in Android?**

* * *

Open AndroidManifest.xml file and set following.

> _android:screenOrientation=”sensorPortait”_

**27\. Enumerate the three key loops when monitoring an activity**

* * *
– Entire lifetime : The activity happens between onCreate and onDestroy

– Visible lifetime : The activity happens between onStart and onStop

– Foreground lifetime : The activity happens between onResume and onPause

**28\. Which language is supported by Android for application development?**

* * *

The main language supported is Java programming language. Java is the most popular
language for app development, which makes it ideal even for new Android developers
to quickly learn to create and deploy applications in the Android environment.

**29\. What are the different tools in Android? Explain them?**

* * *

The **Android SDK** and Virtual Device Manager-It is used to create and manage
Android Virtual Devices (AVD) and SDK packages. The AVD hosts an emulator running a
particular build of Android, letting you specify the supported SDK version, screen
resolution, amount of SD card storage available, and available hardware
capabilities (such as touch screens and GPS).

**The Android Emulator**– Android virtual machine designed to run within a virtual
device on your development computer. Use the emulator to test and debug your
Android applications.

**Dalvik Debug Monitoring Service (DDMS)** – Use the DDMS perspective to monitor
and control the Dalvik virtual machines on which you’re debugging your
applications.

**Android Asset Packaging Tool (AAPT)**– Constructs the distributable Android


package files (.apk).

**Android Debug Bridge,(adb)** – Android Debug Bridge, is a command-line debugging


application shipped with the SDK. It provides tools to copy tools on the device,
browse the device and forward ports for debugging.

**30\. What do intent filters do?**

* * *

– There can be more than one intents, depending on the services and activities that
are going to use them and each component wants to tell which intents they want to
response to.

– Intent filters out the intents that these components are willing to respond to.

**31\. What is the difference between an implicit intent and explicit intent**?

* * *

There are two types of Intent implicit and explicit intent, let see some more
difference between them.

**Implicit:** Implicit intent is when you call system default intent like send
email, send SMS, dial number.
For example,

> _Intent sendIntent = new Intent();_


>
> _sendIntent.setAction(Intent.ACTION\_SEND);_
>
> _sendIntent.putExtra(Intent.EXTRA\_TEXT, textMessage);_
>
> _sendIntent.setType(“text/plain”)_
>
> _startactivity(sendIntent);_

**Explicit:** Explicit intent when you call you’re on application activity from one
activity to another

For example, first activity to second activity:

> _Intent intent = new Intent(first.this, second.class);_


>
> _startactivity(intent);_

**32\. How can your application perform actions that are provided by other
application e.g. sending email?**

* * *

Intents are created to define an action that we want to perform and launches the
appropriate activity from another application.

_Intent intent = new Intent(Intent.ACTION\_SEND);intent.putExtra(Intent.EXTRA\


_EMAIL, recipientArray);_

_startActivity(intent);_

**33\. Name some exceptions in android?**

* * *

- Inflate Exception
- OutOfResourceException
- BadSurfaceTypeException
- BadTokenException

**34\. What is the importance of XML-based layouts?**

* * *

The Purpose of **XML-based layouts** provides a consistent and somewhat standard


means of setting GUI definition format. Normally, layout details are placed in XML
files while other items are placed in source files.

**35\. What is AVD?**

* * *

AVD Stand for **Android Virtual Device** (emulator), The Android SDK includes a
mobile device emulator – a virtual mobile device that runs on your computer.
**36\. Differentiate between LinearLayout, RelativeLayout, AbsoluteLayout.**

* * *

A **LinearLayout** arranges it’s children in a single row or single column one


after the other.

A **RelativeLayout** arranges it’s children in positions relative to each other or


relative to parent depending upon the LayoutParams defined for each view.

**AbsoluteLayout** needs the exact positions of the x and y coordinates of the view
to position it. Though this is deprecated now.

**37\. Is it okay to change the name of an application after its deployment?**

* * *

It is not recommended to change the application name after its deployment(final


stage) because this action may break some functionality. For example, shortcuts
will not work if you change application name.

**38\. When does Android start and end an application process?**

* * *

Android starts an application process when application’s component needs to be


executed. It then closes the process when it’s no longer needed (garbage
collection).

**39\. What type of listener is used to get the ratings from the RatingBar Widgets?
**

* * *

onRatingBarChangeListener() is used. Click to get more details about **RatingBar**


and **SeekBar**.

**40\. What are the features of Android?**

* * *

- Components can be reused and replaced by the application framework.


- Optimized DVM for mobile devices
- SQLite enables to store the data in a **structured**
- Supports GSM telephone and Bluetooth, WiFi, 3G and EDGE technologies
- The development is a combination of a device emulator, debugging tools, memory
profiling and plug-in for Eclipse IDE.

**41\. How will you record a phone call in Android? or How to handle on Audio
Stream for a call in Android?**

* * *

PROCESS\_OUTGOING\_CALLS: Will Allows an application to monitor, modify, or abort


outgoing calls. So through that we can monitor the Phone calls.

**42\. What do you understand by Intents in Android IDE?**

* * *
Intents are used to display notification messages on android enable devices. These
notifications may be alert messages or any other notifications. The best part is
that Android users can also respond to these intents whenever required.

**43\. As an Android developer, how will you enumerate the steps necessary to
created bounded services through AIDL?**

* * *

- Create AIDL file to define the programming interface.


- Implement the interface and
- Expose the interface

**44\. How will you differentiate nine-patch image from regular bitmap image?**

* * *

Nine-patch image works on nine parameters when resizing an image that includes four
corners, 4 edges, and one axis. At the same time, Regular bitmap images work on the
overall background image.

**45\. Why To Use Android?**

* * *

Android is useful because:

- It is simple and powerful SDK


- Licensing, Distribution or Development fee is not required
- Easy to Import third party Java library
- Supporting platforms are ? Linux, Mac Os, Windows

**46\. How To Remove Desktop Icons And Widgets?**

* * *

Press and Hold the icon or widget. The phone will vibrate and on the bottom of the
phone you will see anoption to remove. While still holding the icon or widget drag
it to the remove button. Once remove turns red drop the item and it is gone.

**47\. Enumerate the steps in creating a bounded service through AIDL.**

* * *

- create the .aidl file, which defines the programming interface


- implement the interface, which involves extending the inner abstract Stub class
as well as implanting its methods.
- expose the interface, which involves implementing the service to the clients.

**48\. What are the measures to avoid application ANR?**

* * *

ANR in application is annoying to user. It can be caused due to various reasons.


Below are some of the tips to avoid ANR

- Perform all you long running network or database operation in separate thread
- If you have too much of background tasks, then take it off the UI thread. You may
use IntentService
- Server not responding for longer period can be guilt for ANR. To avoid always
define HTTP time out for your all your webs service calls.
- Be watchful of infinite loops during your complex calculations

**49\. What are the different storage methods in android?**

* * *

**Shared Preferences** – Store private primitive data in key-value pairs. This


sometimes gets limited as it offers only key value pairs. You cannot save your own
java types.

**Internal Storage** – Store private data on the device memory

**External Storage** – Store public data on the shared external storage

**SQLite Databases** – Store structured data in a private database. You can define
many number of tables and can store data like other RDBMS.

**50\. what is FrameLayout ?**

* * *

The FrameLayout is the most basic of the Android layouts. FrameLayouts are built to
hold one view. As with all things related to development, there is no hard rule
that FrameLayouts can’t be used to hold multiple views.

**51\. What is needed to make a multiple choice list with a custom view for each
row?**

* * *

Multiple choice list can be viewed by making the CheckBox android:id value be
“@android:id /text1″. That is the ID used by Android for the CheckedTextView in
simple\_list\_item\_multiple\_choice.

**52\. How is nine-patch image different from a regular bitmap?**

* * *

It is a resizable bitmap resource that can be used for backgrounds or other images
on the device. The NinePatch class permits drawing a bitmap in nine sections. The
four corners are unscaled; the four edges are scaled in one axis, and the middle is
scaled in both axes.

**53\. what is Android User Interface ?**

* * *

User interface is what the user will see and interact with to perform some
operations. Android comes with many friendly UI elements and layouts which helps to
build interactive applications.

**54\. What is User Events ?**

* * *

Event is a user interacting with the help of a Touchscreen. The Android framework
maintains an Event Queue in which the events are arranged as they occur. The events
are removed in First-In-First-Out (FIFO) basis.

**55\. What is the use of WebView in android?**

* * *

A WebView is an android UI component that displays webpages. It can either display


a remote webpage or can also load static HTML data. This encompasses the
functionality of a browser that can be integrated to application. WebView uses the
WebKit rendering engine to display web pages and includes methods to navigate
forward and backward through a history, zoom in and out, etc

**56\. Why is emulator important in Android environment?**

* * *

With emulator, it becomes easy for the developers to play around, edit and create
the interface easily. Thus, it acts more like a mobile phone. With emulator it
becomes easy to write and even perform the test codes and debug. It is the safest
place that can be used for testing the codes

**57\. What are common use cases for using an Intent?**

* * *

- starting an internal Activity (explicit Intent)


- starting an internal Service (explicit Intent)
- starting an external Activity/Application (implicit Intent)
- delivering a broadcast

**58\. When to use AsyncTask?**

* * *

AsyncTask is a convenient way to perform short operations (a few seconds) from


within an Activity or Fragment.

When using an Asynctask inside an Activity or Fragment, check if a running


AsyncTask is canceled when the user leaves the Activity/Fragment. Implement
AsyncTask inside an Activity or Fragment always as a static inner class and avoid
references to the outer Activity/Fragment to avoid memory leaks.

**59\. What is the main purpose of a Fragment?**

* * *

The main purpose of a Fragment is to support a more dynamic UI (tablets,


smartphones) and also to make the reuse of UI components a lot easier.

A Fragment can also exist without its own UI as an invisible worker for the
Activity.

A Fragment is closely tied to the Activity it is in. When the Activity is paused,
so are all fragments in it; When the Activity is destroyed, so are all fragments in
it.

**60\. What is the ViewHolder-Pattern?**


* * *

The ViewHolder design pattern can be used to increase the speed at which a ListView
renders data.

The pattern avoids the repeated lookup of view resources. The number of times which
the findViewById() method is invoked is drastically reduced, existing views do not
have to be garbage collected and new views do not have to be inflated. The view
references for every row are stored in a simple object for later reuse.

**61\. What is the benefit of an Android library project?**

* * *

An Android library project allows the distribution of resources (e.g. layouts,


themes) and manifest entries as well as Java Code (e.g. activites). It makes the
process of creating multiple apps from the same code base easier.

**62\. What are typical subdirectories that the “res” directory does contain?**

* * *

The “res” folder contains various resource files:

- res/drawable/\* -> images and nine-patch files.


- res/layout/ -> XML-based UI layout files.
- res/values/ -> strings, colors, dimensions, …
- res/menu/ -> menu specification files
- res/raw/ -> raw files like a CSV file, movie clip or audio clip (mp3)
- res/xml/ -> general XML files

**63\. What is the function of an intent filter?**

* * *

Because every component needs to indicate which intents they can respond to, intent
filters are used to filter out intents that these components are willing to
receive. One or more intent filters are possible, depending on the services and
activities that is going to make use of it.

**64\. What is a StateListDrawable?**

* * *

A StateListDrawable is a drawable object defined in the XML that allows us to show


a different color/background for a view for different states. Essentially it’s used
for Buttons to show a different look for each state(pressed,focused, selected,
none).

**65\. How does RecyclerView differ from ListView?**

* * *

- A RecyclerView recycles and reuses cells when scrolling. This is a default


behaviour. It’s possible to implement the same in a ListView too but we need to
implement a ViewHolder there
- A RecyclerView decouples list from its container so we can put list items easily
at run time in the different containers (linearLayout, gridLayout) by setting
LayoutManager
- Animations of RecyclerView items are decoupled and delegated to ItemAnimator

**66\. What is the proper way of setting up an Android-powered device for app
development?**

* * *

The following are steps to be followed prior to actual application development in


an Android-powered device:

– Declare your application as “debuggable” in your Android Manifest.

– Turn on “USB Debugging” on your device.

– Set up your system to detect your device.

**67\. How do you find any view element into your program?**

* * *

Findviewbyid: Finds a view that was identified by the id attribute from the XML
processed inActivity.OnCreate(Bundle).

**Syntax**

> \[Android.Runtime.Register(“findViewById”, “(I)Landroid/view/View;”,


“GetFindViewById\_IHandler”)\]
>
> public virtual View FindViewById (Int32 id)

**68\. How would you create an AUTOINCREMENT field?**

* * *

For autoincrement, you have to declare a column of the table to be INTEGER PRIMARY
KEY, then whenever you insert a NULL into that column of the table, the NULL is
automatically converted into an integer which is one greater than the largest value
of that column over all other rows in the table, or 1 if the table is empty.

**69\. What are the basic tools used to develop an android app?**

* * *

- JDK
- Eclipse+ADT plugin
- SDK Tools

**70\. What is sleep mode in Android?**

* * *

In sleep mode, CPU is slept and doesn’t accept any commands from android device
except Radio interface layer and alarm.

**71\. Which types of flags are used to run an application on Android?**

* * *

Following are two types of flags to run an application in Android:


> FLAG\_ACTIVITY\_NEW\_TASK
>
> FLAG\_ACTIVITY\_CLEAR\_TOP

**72\. What is the importance of settings permissions in app development?**

* * *

Permissions allow certain restrictions to be imposed primarily to protect data and


code. Without these, codes could be compromised, resulting to defects in
functionality.

**73\. What is a visible activity?**

* * *

A visible activity is one that sits behind a foreground dialog. It is actually


visible to the user, but not necessarily being in the foreground itself.

**74\. When is the best time to kill a foreground activity?**

* * *

The foreground activity, being the most important among the other states, is only
killed or terminated as a last resort, especially if it is already consuming too
much memory. When a memory paging state has been reach by a foreground activity,
then it is killed so that the user interface can retain its responsiveness to the
user.

**75\. Is it possible to use or add a fragment without using a user interface?**

* * *

Yes, it is possible to do that, such as when you want to create a background


behavior for a particular activity. You can do this by using add(Fragment,string)
method to add a fragment from the activity.

**76\. How do you remove icons and widgets from the main screen of the Android
device?**

* * *

To remove an icon or shortcut, press and hold that icon. You then drag it downwards
to the lower part of the screen where a remove button appears.

**77\. What composes a typical Android application project?**

* * *

A project under Android development, upon compilation, becomes an .apk file. This
apk file format is actually made up of the AndroidManifest.xml file, application
code, resource files, and other related files.

**78\. What is a Sticky Intent?**

* * *

A Sticky Intent is a broadcast from sendStickyBroadcast() method such that the


intent floats around even after the broadcast, allowing others to collect data from
it.

**79\. Do all mobile phones support the latest Android operating system?**

* * *

Some Android-powered phone allows you to upgrade to the higher Android operating
system version. However, not all upgrades would allow you to get the latest
version. It depends largely on the capability and specs of the phone, whether it
can support the newer features available under the latest Android version.

**80\. What is portable wi-fi hotspot?**

* * *

Portable Wi-Fi Hotspot allows you to share your mobile internet connection to other
wireless device. For example, using your Android-powered phone as a Wi-Fi Hotspot,
you can use your laptop to connect to the Internet using that access point.

**81\. How can two Android applications share same Linux user ID and share same VM?
**

* * *

The applications must sign with the same certificate in order to share same Linux
user ID and share same VM.

**82\. Can you deploy executable JARs on Android? Which packaging is supported by
Android?**

* * *

No, Android platform does not support JAR deployments. Applications are packed into
Android Package (.apk) using Android Asset Packaging Tool (AAPT) and then deployed
onto Android platform. Google provides Android Development Tools for Eclipse that
can be used to generate Android Package.

**83\. What is the difference between TRUNCATE and DELETE commands?**

* * *

Both will result in deleting all the rows in the table .TRUNCATE call cannot be
rolled back as it is a DDL command and all memory space for that table is released
back to the server. TRUNCATE is much faster.Whereas DELETE call is an DML command
and can be rolled back.

**84\. What is a candidate key?**

* * *

A table may have more than one combination of columns that could uniquely identify
the rows in a table; each combination is a candidate key.

**85\. What is an URIs?**

* * *

Android uses URI strings both for requesting data (e.g., a list of contacts) and
for requesting actions (e.g., opening a Web page in a browser). Both are valid URI
strings, but have different values. All requests for data must start with the
string “content://”. Action strings are valid URIs that can be handled
appropriately by applications on the device; for example, a URI starting with
“http://” will be handled by the browser.

**86\. What is an Intent Receiver?**

* * *

An application class that listens for messages broadcast by calling


Context.broadcastIntent

**87\. What is SQLite? How does it differ from client-server database management
systems?**

* * *

SQLite is the open-source relational database of choice for Android applications.


The SQLite engine is serverless, transactional, and self-contained. Instead of the
typical client-server relationship of most database management systems, the SQLite
engine is integrally linked with the application. The library can also be called
dynamically, and makes use of simple function calls that reduce latency in database
access.

**88\. Tell us something about nine-patch image.**

* * *

– The Nine-patch in the image name refers to the way the image can be resized: 4
corners that are unscaled, 4 edges that are scaled in 1 axis, and the middle one
that can be scaled into both axes.

– A Nine-patch image allows resizing that can be used as background or other image
size requirements for the target device.

**89\. What is the role of compatibility that is used in Android?**

* * *

– The compatibility is defined in terms of android compatible devices that run any
application. This application is written by third party developers using the
Android platform that comes in the form of SDK and NDK.

– There are many filters that are used to separate devices that are there to
participate in the compatibility mode for the Android applications. The devices
that are compatible require the android to approve it for their trademark. The
devices that are not passes the compatibility are just given in the Android source
code and can use the android trademark.

– The compatibility is a way through which the user can participate in the Android
application platform. The source code is free to use and it can be used by anyone.

**90\. How long does compatibility take?**

* * *

The process is automated. The Compatibility Test Suite generates a report that can
be provided to Google to verify compatibility. Eventually we intend to provide
self-service tools to upload these reports to a public database.

**91\. Is there anyway to determine if an Intent passed into a BroadcastReceiver’s


on Receive is the result of a sticky Broadcast Intent, or if it was just sent?**

* * *

When you call registerReceiver( ) for that action — even with a null
BroadcastReceiver — you get the Intent that was last broadcast for that action.
Hence, you can use this to find the state of the battery without necessarily
registering for all future state changes in the battery.

**92\. How to Translate in android?**

* * *

The Google translator translates the data of one language into another language by
using XMPP to transmit data. You can type the message in English and select the
language which is understood by the citizens of the country in order to reach the
message to the citizens.

**93\. Can an application be started on power up?**

* * *

Yes, application can be started on power up.

**94\. What is the TTL (Time to Live)? Why is it required?**

* * *

TTL is a value in data packet of Internet Protocol. It communicates to the network


router whether or not the packet should be in the network for too long or
discarded. Usually, data packets might not be transmitted to their intended
destination within a stipulated period of time. The TTL value is set by a system
default value which is an 8 -bit binary digit field in the header of the packet.
The purpose of TTL is, it would specify certain time limit in seconds, for
transmitting the packet header. When the time is exhausted, the packet would be
discarded. Each router receives the subtracts our when the packet is discarded, and
when it becomes zero, the router tests the discarded packets and sends a message,
Internet Control Protocol message back to the originating host.

**95\. What is APK format?**

* * *

The APK file is compressed AndroidManifest.xml file with extension .apk, Which have
application code (.dex files), resource files, and other files which is compressed
into single .apk file.

**96\. What are the advantages of Android?**

* * *

The following are the advantages of Android:

The customer will be benefited from wide range of mobile applications to choose,
since the monopoly of wireless carriers like Orange and AT&T will be broken by
Google Android.
Features like weather details, live RSS feeds, opening screen, icon on the opening
screen can be customized innovative products like the location -aware services,
location of a nearby convenience store etc., are some of the additive facilities in
Android.

**97\. What is Xmpp used for?**

* * *

Extensible Messaging and Presence Protocol (XMPP) is a communications protocol for


message-oriented middleware based on XML (Extensible Markup Language).

**98\. List the Type of Android Application?**

* * *

There is 4 type categories in Android application:

- **Foreground** : An application that’s useful only when it’s in the foreground


and is effectively suspended when it’s not visible. Games and Map mashups are
common example.
- **Background :** An application with limited interaction that, apart from when
being configured , spends most of its lifetime hidden. Examples include call
screening applications and SMS auto-responders.
- **Intermittent**: Expects some interactivity but does most of its work in the
background. often these applications will be set up and then run silently,
notifying users when appropriate. A common example would be a media player.
- **Widget**: Some Application are represented only as a home-screen widget.

**99\. What is the generic in Java?**

Generics are a facility of generic programming that were added to the Java
programming language in 2004 within the official version J2SE 5.0. They were
designed to extend Java’s type system to allow “a type or method to operate on
objects of various types while providing compile-time type safety.”

**100\. What are the Android Development Tools?**

* * *

The Android SDK and Virtual Device Manager Used to create and mange Android Virtual
Device (AVD) and SDK packages.

The **Android Emulator** An implementation of the android virtual machine designed


to run within a virtual device on your development computer. Use the emulator to
test and debug your android applications.

**Dalvik Debug Monitoring Service** (DDMS) use the DDMS perspective to monitor and
control the dalvik virtual machines on which your debugging your application.

**Android Asset Packaging Tool** (AAPT) constructs the distributable Android


packges files (.apk).

**Android Debug Bridge** (ADB) A client- server application that provides a link to
a running emulator.It lets you copy files, Install complied application
packges(.apk) and run shall commands.

You might also like