What is android?
Android is a stack of software for mobile devices which has 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 by a DVM device. DVM executes Java language’s byte code which later transforms into .dex format files.
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 manner.
- 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.
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
Android Application Architecture has the following components:
- Services – like Network Operation
- Intent - To perform inter-communication between activities or services
- Resource Externalization - such as strings and graphics
- Notification signaling users - light, sound, icon, notification, dialog etc.
- Content Providers - They share data between applications
The activity can be in one of four states:
- Active: the activity started, is running and is in the foreground.
- Paused: the activity is running and visible but another activity (non full sized) is running on the top or a notification is displayed. The user can see the activity but can not interact with it. A paused activity is fully alive (maintains state and member information) but can be killed by the system in low memory situations.
- Stopped: the activity is running but invisible because the user has launched another activity that comes to the foreground the activity is alive (maintains state and member information) but can be killed by the system in low memory situations.
- Dead: either the activity is not started or it was in pause or stop state and was terminated by the system to free some memory or by asking the user to do so.

Why SQLite is lightweight?
SQLite is an embeddable database system that uses flat files. It does not need to be started, stopped, configured, or managed like other SQL databases. It is lightweight, fast, and compact.
What’s the difference between file, class and activity in android?
File – It is a block of arbitrary information, or resource for storing information. It can be of any type.
Class – Its a compiled form of .Java file . Android finally used this .class files to produce an executable apk
Activity – An activity is the equivalent of a Frame/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.
What is an action?
The Intent Sender desires something or doing some task.
What is activity?
A single screen in an application, with supporting Java code.
What is activityCreator in Android ?
- An activityCreator is the initial 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.
What is intent in Android?
An Android application can contain zero or more activities. If you want to navigate from one activity to another then android provides you Intent class. This class is available in android.content.Intent package. One of the most common uses for Intents is to start new activities.
There are two types of Intents.
Explicit Intents
Implicit Intents
Intents works in pairs: action and data. The action defines what you want to do, such as editing an item, viewing the content of an item etc. The data specifies what is affected,such as a person in the Contacts database. The data is specified as an Uri object.
- Explicitly starting an Activity
Intent intent = new Intent (this, SecondActivity.class);
startActivity(intent);
Here SecondActivity is the name of the target activity that you want to start.
- Implicitly starting an Activity
If you want to view a web page with the specified URL then you can use this procedure.
Intent i = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse(“http://www.google.com”));
startActivity(i);
What is a Sticky Intent?
sendStickyBroadcast() performs a sendBroadcast (Intent) known as sticky, i.e. the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of registerReceiver (BroadcastReceiver, IntentFilter). In all other ways, this behaves the same as sendBroadcast(Intent).
One example of a sticky broadcast sent via the operating system is ACTION_BATTERY_CHANGED. 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.
Is there anyway to determine if an Intent passed into a BroadcastReceiver's onReceive is the result of a sticky Boradcast Intent, or if it was just sent?
Example for sticky broadcast
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.
How the nine-patch Image different from a regular bitmap? or Difference between nine-patch Image vs regular Bitmap Image.
It is one of a resizable bitmap resource which is being used as backgrounds or other images on the device. The NinePatch class allows drawing a bitmap in nine sections. The four corners are unscaled; the middle of the image is scaled in both axes, the four edges are scaled into one axis.

What Programming languages does Android support for applicationdevelopment?
Android applications supports using Java Programming Language. which is coded in Java and complied using Android SDK.
What is a resource?
A user defined JSON, XML, bitmap, or other file, injected into the application build process, which can later be loaded from code.
How will you record a phone call in Android? or How to handle on Audio Stream for a call in Android?
Permissions.PROCESS_OUTGOING_CALLS: Will Allows an application to monitor, modify, or abort outgoing calls. So through that we can monitor thePhone calls.
Does Android support the Bluetooth serial port profile?
A. Yes.
Can an application be started on powerup?
A. Yes.
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.
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 nearbyconvenience store etc., are some of the additive facilities in Android.
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.
What are the dialog boxes that are supported in android? Explain.
Android supports 4 dialog boxes:
- AlertDialog : An alert dialog box supports 0 to 3 buttons and a list of selectable elements, including check boxes and radio buttons. Among the other dialog boxes, the most suggested dialog box is the alert dialog box.
- ProgressDialog: This dialog box displays a progress wheel or a progress bar. It is an extension of AlertDialog and supports adding buttons.
- DatePickerDialog: This dialog box is used for selecting a date by the user.
- TimePickerDialog: This dialog box is used for selecting time by the user.
Different data storage methods in android ?
Android provides several options for you to save persistent application data. The solution you choose depends on your specific needs, such as whether the data should be private to your application or accessible to other applications (and the user) and how much space your data requires.
Your data storage options are the following:
- Shared Preferences: Store private primitive data in key-value pairs.
- 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.
- Network Connection: Store data on the web with your own network server.
Explain in brief about the important file and folder when you create new android application.
When you create android application the following folders are created in the package explorer in eclipse which are as follows:
src: Contains the .java source files for your project. You write the code for your application in this file. This file is available under the package name for your project.
gen —This folder contains the R.java file. It is compiler-generated file that references all the resources found in your project. You should not modify this file.
Android 4.0 library: This folder contains android.jar file, which contains all the class libraries needed for an Android application.
assets: This folder contains all the information about HTML file, text files, databases, etc.
bin: It contains the .apk file (Android Package) that is generated by the ADT during the build process. An .apk file is the application binary file. It contains everything needed to run an Android application.
res: This folder contains all the resource file that is used byandroid application. It contains subfolders as: drawable, menu, layout, and values etc.
What is AIDL?
- AIDL is the abbreviation for Android Interface Definition Language.
- It handles the interface requirements between a client and a service to communicate at the same level through interprocess communication.
- The process involves breaking down objects into primitives that are Android understandable.
What data types are supported by AIDL?
AIDL supports following data types:
-string
-List
-Map
-charSequence
-all native Java data types like int,long, char and Boolean.
What is Dalvik Virtual Machine?
- It is Android's virtual machine.
- It is an interpreter-only virtual machine which executes files in Dalvik Executable (.dex) format. This format is optimized for efficient storage and memory-mappable execution.
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.
What is adb?
Adb is short for Android Debug Bridge. It allows developers the power to execute remote shell commands. Its basic function is to allow and control communication towards and from the emulator port.
What is ANR?
ANR is short for Application Not Responding. This is actually a dialog that appears to the user whenever an application have been unresponsive for a long period of time.
How can the ANR be prevented?
One technique that prevents the Android system from concluding a code that has been responsive for a long period of time is to create a child thread. Within the child thread, most of the actual workings of the codes can be placed, so that the main thread runs with minimal periods of unresponsive times.
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