Monday, 24 August 2015

Android Interview Questions PART II



What is Android?
..Android is a software stack for mobile devices that includes an operating system, middleware and key applications. The application runs in its own process and its own instance of Dalvik virtual machine. Many virtual machines are efficiently by a DVM device. DVM run Java bytecode languages which later turns into. DEX files format.

 How do I remove sections from my favourites?

A. In the Favorites menu, tap the red icon to the left of the elements. Otherwise, press the star icon in the upper right corner of the screen in question so that it returns to its white state. What is Mono for Android? A. Mono for Android is a software development kit that enables developers to use C # to create mobile applications for Android-based devices.Mono Android API exposes two series kernel. NET API that developers are familiar with C # and C # binding to native Android API exposed through the Mono.Android. * Namespace.You use Mono for Android applications to be distributed through the development to implement on your personal hardware or Android simulator stores. the Android application or software
 What is included in Mono for Android?

A. Mono for Android consists of the core Mono runtime, bindings for native Android Mono for Android API, a plug-in for Visual Studio 2010 for Android applications and an SDK to build the instruments includes developing application sour debug and deploy your Visual Studio 2010 Visual Studio 2010 plugin developers can to develop their applications to debug and deploy on an Android simulator, an Android device or Android Application Store. Our MonoDevelop IDE is also an add-in support for Mono for Android development. What should I develop applications for Android Mono? A. Mono for Android on Windows provides a plugin for Visual Studio 2010 Professional or better. Also support Mono for Android development using MonoDevelop for Windows users who do not have copies of Visual Studio 2010 Professional or better.Mono Android to Mac developers can use all MonoDevelop.On platforms, Mono for Android requires Android SDK (which requires Java JDK). . My users need to install Mono? R. No, when you turn on the App Store Mobile Mono runtime in your application is statically linked to your application. No additional dependencies required. From the viewpoint of the user, there is no difference between an application made in Java and created an application with Mono for Android, but a little larger (~ 4.4MB) application size.

Where is the UI designer?

A. Mono for Android contains no user interface designer UI XML files we do not know of a integrated user Mono for Android 1.0 UI designer. No past decisions that were made. We will listen user feedback to decide which resources for future versions. ..
Android application architecture includes the following elements:

Services - such as Network Operation Intent - In order to carry out inter-communication between the activities or services
Outsourcing of resources - such as strings and images Notification signaling users - light, sound, icon, communication, dialogue, etc. Content Providers - They share data between applications How will you record a phone call in Android? How to get the audio stream for use Android? A grip Permissions.PROCESS_OUTGOING_CALLS: Allows an application to monitor, modify, or abort outgoing calls.
What is the activity?

The building block of the user activity. They are in a long conversation with the user can remain active even at rest, as the conversation continues. In terms of desktop development, an activity equivalent to a form.
Describe the APK format.
...APK (Android Packaging Key) file is compressed file, the application code AndroidManifest.xml (files. Dex), source files and other files. A project is compiled into an APK file .. 
What are the different phases of the life cycle of the activity? 
Transitions from one state to another activity, it is advised of the change by calling the following protected methods: 

1) void onCreate (Bundle saved instance state) 
2) void OnStart () 
3) Empty onRestart () 
4) void onResume () 
5) void onPause () 
6) void onStop () 
7)Destroy() 

These seven methods define the entire lifecycle of an activity.

What are the advantages of Android? 
It is simple and powerful SDK. Licensing, distribution and promotion is required. Easy to import third-party Java library.
Supported platforms - Linux, Mac OS, Windows. 
Innovative products such as location-based services, location of a nearby supermarket, etc., are some of the additive facilities in Android. 
The components can be reused and be replaced by the application framework. DVM optimized for mobile devices. 
SQLite to store in a structured way data. 
Support for advanced technologies GSM and Bluetooth, WiFi, 3G. 
The development is a combination of a device emulator, tools for debugging, memory profiling and plug-in for Eclipse IDE. 
The customer will benefit from a wide range of mobile applications to choose from, because the monopoly of wireless carriers like AT & T and Orange will be broken by Google Android. Describe the architecture of Android applications.


What is the purpose? 
A class (Intent) describes what the caller wants to do. The caller sends this intent to Android's intent resolver, which is the most appropriate activity for the design finds. For example, to open a PDF file is an intention, and the Adobe Reader is the suitable activity for this purpose. 
What is an explicit intention? In an explicit intention, we provide, in fact, the activity is necessary in order to satisfy the objective. In other words, we aim to stress component. This is generally used for internal application messages. 


What is implied intention? .. In an implicit intent, the main force of the Android design, we have to declare an intention and allow the platform to an activity that can meet the objective. Here we do not explain the target component and therefore it is mostly used for the activation of components of other applications seamlessly 


What is a AndroidManifest.xml file? 
Applications declare their components in a manifest file that is included in the Android package, the. Apk who also owns the code, files and application resources. The manifest is a structured XML file and is always named AndroidManifest.xml for all applications. 
It is also used to name the libraries of the application must be linked against (besides the default Android library) and identify any authority that the application is ready to be acquired.


Next
1. Explain Java Final Keyword ?
Final variable can be assigned only once.
Final method can not be overriden in subclass.
Final classes can not be extended.
2.Can a final class in java be extended ?
NO. Java classes declared as final cannot be extended.

3.Explain Java Static Keyword ?
Static variables are initialized only once , at the start of the execution . These variables will be initialized first, before the initialization of any instance variables 
A single copy to be shared by all instances of the class
A static variable can be accessed directly by the class name and doesn’t need any object
Java instance variables are given separate memory for storage. If there is a need for a variable to be common to all the objects of a single java class,
Similar to static variables, java static methods are also common to classes and not tied to a java instance.

4.How are the exceptions handled in java?
When an exception occurs the execution of the program is transferred to an appropriate exception handler.The try-catch-finally block is used to handle the exception.

5.What is unchecked exception(Runtime Exception )?
Runtime exceptions represent problems that are the result of a programming problem such as dividing by zero, trying to access an object through a null reference.
Runtime exceptions need not be explicitly caught in try catch block as it can occur anywhere in a program.
The solution to rectify is to correct the programming logic where the exception has occurred or provide a check.

6.What is checked exception?
Checked exception are the exceptions which forces the programmer to catch them explicitly in try-catch block. It is a subClass of Exception. Example: IOException.

7.Use of java private constructor?
Private constructors prevent a class from being explicitly instantiated by its callers.

There are some common cases where a private constructor can be useful:

classes containing only static utility methods
classes containing only constants
type safe enumerations
singletons

8.What is Intents and Intent Filters ?
The core components of an application — activities, services, and broadcast receivers — are activated through messages, called intents.
Intent filter describes a capability of the core components(activities, services, and broadcast receivers).

9.What is AndroidManifest File?
AndroidManifest file is a root directory of Android applications which contains all the details needed by the android system about the application.

11.What is a content provider?
A SQLite database is private to the application which creates it. If you want to share data with other applications you can use a content provider.
Its is typically used to share data with other application.

Please Send Your Comments To ambilpura.sunil@gmail.com


NEXT Tutorial: Android Programming Tutorials 1 : Hello World..! 


No comments:

Post a Comment