Tuesday, 9 July 2013

Interview Questions 31 -- 40

What is the importance of having an emulator within the Android environment?
The emulator provides an interface that acts as if it were an actual mobile device. They can write and test codes, and even debug. Emulators are a safe place for testing codes especially if it is in the early design phase.

Differentiate Activities from Services.
Activities can be closed, or terminated anytime the user wishes. On the other hand, services are designed to run behind the scenes,
and can act independently. Most services run continuously, regardless of whether there are certain or no activities being executed.

What are containers?
Containers, as the name itself implies, holds objects and widgets together, depending on which specific items are needed and
in what particular arrangement that is wanted. Containers may hold labels, fields, buttons, or even child containers, as examples.

What is Orientation?
Orientation, which can be set using setOrientation(), dictates if the LinearLayout is represented as a row or as a column.
Values are set as either HORIZONTAL or VERTICAL.

What is the importance of Android in the mobile market?
Developers can write and register apps that will specifically run under the Android environment. This means that every mobile device that is Android enabled will be able to support and run these apps. With the growing popularity of Android mobile devices, developers can take advantage of this trend by creating and uploading their apps on the Android Market for distribution to anyone who wants to download it.

What do you think are some disadvantages of Android?
Given that Android is an open-source platform, and the fact that different Android operating systems have been released on different mobile devices, there’s no clear cut policy to how applications can adapt with various OS versions and upgrades. One app that runs on this particular version of Android OS may or may not run on another version. Another disadvantage is that since mobile devices such as  phones and tabs come in different sizes and forms, it poses a challenge for developers to create apps that can adjust correctly to the
right screen size and other varying features and specs.

How will you record a phone call in Android? How to get a handle on Audio Stream for a call in Android?
Permissions.PROCESS_OUTGOING_CALLS: Allows an application to monitor, modify, or abort outgoing calls.

How are escape characters used as attribute?
Escape characters are preceded by double backslashes. For example, a newline character is created using ‘\\n’

What are the different states wherein a process is based?
There are 4 possible states:
- foreground activity
- visible activity
- background activity
- empty process

When does ANR occur?
The ANR dialog is displayed to the user based on two possible conditions. One is when there is no response to an input event within
5 seconds, and the other is when a broadcast receiver is not done executing within 10 seconds.

No comments:

Post a Comment