1.What is Android?
Android is a stack of 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 by a DVM device. DVM executes Java languages byte code which later transforms into .dex format files.
2.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.
3. 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
4. Describe Android Application Architecture.
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
5. 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 AT&T and Orange 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.
6. Describe a real time scenario where android can be used
Imagine a situation that you are in a country where no one understands the language you speak and you can not read or write. However, you have mobile phone with you.
With a mobile phone with 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.
7 .What is an Activity?
A single screen in an application, with supporting Java code.
8.What is an Intent?
A class (Intent) which describes what a caller desires to do. The caller will send this intent to Android’s intent resolver, which finds the most suitable activity for the intent. E.g. opening a PDF document is an intent, and the Adobe Reader apps will be the perfect activity for that intent (class).
9.How the nine-patch Image different from a regular bitmap? Alternatively, what is the 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.
10.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.
11.How to select more than one option from list in android xml file? Give an example?
Specify android id, layout height and width as depicted in the following example.
12. Explain about the exceptions of Android
The following are the exceptions that are supported by Android
InflateException : When an error conditions are occurred, this exception is thrown
Surface.OutOfResourceException: When a surface is not created or resized, this exception is thrown
SurfaceHolder.BadSurfaceTypeException: This exception is thrown from the lockCanvas() method, when invoked on a Surface whose is SURFACE_TYPE_PUSH_BUFFERS
WindowManager.BadTokenException: This exception is thrown at the time of trying to add view an invalid WindowManager.LayoutParamstoken.
13. What are the different Storage Methods in android?
Android provides many options for storage of persistent data. It provides the solution according to your need. The storages which have been provided in Android are as follows:-
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.
14.How will you record a phone call in Android? or How to handle an Audio Stream for a call in Android?
Permission.PROCESS_OUTGOING_CALLS: Will Allow an application to monitor, modify, or abort outgoing calls. So using that permission we can monitor the Phone calls.
15.Does Android support the Bluetooth serial port profile?
16.Can an application be started on powerup?
17.What is the APK format?
The APK file is compressed AndroidManifest.xml file with extension .apk. It also includes the application code (.dex files), resource files, and other files which are compressed into a single .apk file.
18.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.
19.Describe Briefly the Android Application Architecture
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
20.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.
21.What dialog boxes are supported in android?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.
22. What is localization and how to achieve?
Localization is a way of representing the products in different languages. Android is an operating system which runs in many regions, so to reach different users localization is a must. Localization in Android can be achieved by incorporating different languages in the application which you are using. To do this knowledge of Java, XML elements, Activity lifecycle and general principles of internationalization and localization are required.
23. What kind of open-source project is Android?
Google oversees the development of the core Android open-source platform, and works to create robust developer and user communities. For the most part the Android source code is licensed under the permissive Apache Software License 2.0, rather than a “copyleft” license. The main reason for this is because our most important goal is widespread adoption of the software, and we believe that the ASL2.0 license best achieves that goal.
You can find more information on this topic at our Project Philosophy and Licensing pages.
24. 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
25. 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.
26. 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: are 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 simple implementation of the type and easy to use commands.
• Non-Persistent Objects: are 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 increase the delay.