Android Interview Questions with Answer for All

Here I am describing you some but important android interview questions. 

Question 1. What is PushNotification ?

Answer: Push Notification is a service which can be perform by GCM(Google Cloud Messaging). It helps developers send data from servers to their applications on Android devices. This is works on minimum android version 2.2. Before 27 June 2012, I called C2DM(Cloud to Device Messaging).

Question 2. What is Canvas? How it Works ?

Answer:  The Canvas class holds the “draw” calls. To draw something, you need 4 basic components: A Bitmap to hold the pixels, a Canvas to host the draw calls (writing into the bitmap), a drawing primitive (e.g. Rect, Path, text, Bitmap), and a paint (to describe the colors and styles for the drawing).

When you’re writing an application in which you would like to perform specialized drawing and/or control the animation of graphics, you should do so by drawing through a Canvas. A Canvas works for you as a pretense, or interface, to the actual surface upon which your graphics will be drawn — it holds all of your “draw” calls. Via the Canvas, your drawing is actually performed upon an underlying  Bitmap, which is placed into the window.

Question 3.  Describe Surface View ?

Answer: Provides a dedicated drawing surface embedded inside of a view hierarchy. You can control the format of this surface and, if you like, its size; the SurfaceView takes care of placing the surface at the correct location on the screen.

Question 4. What is View ?

Answer: This class represents the basic building block for user interface components. A View occupies a rectangular area on the screen and is responsible for drawing and event handling. View is the base class for widgets, which are used to create interactive UI components (buttons, text fields, etc.).

Question 5. Describe Viewgroup ?

Answer: The ViewGroup subclass is the base class for layouts, which are invisible containers that hold other Views (or other ViewGroups) and define their layout properties.

Questions 6. Describe OpenGLES ?

Answer: OpenGL is a cross-platform graphics API that specifies a standard software interface for 3D graphics processing hardware. OpenGL ES is a flavor of the OpenGL specification intended for embedded devices.

Question 7. Define types of Animation ?

Answer: These classes provide functionality for the property animation system, which allows you to animate object properties of any type. intfloat, and hexadecimal color values are supported by default.

  • Translate Animation
  • Alpha Animation
  • Rotate Animation
  • Scale Animation

Translate Animation: Translate Animation controls the position and location of a layout or button or any view on which animation is being applied. It can move an object either in x direction or y direction.

Alpha Animation: Alpha Animation is another type of Animation available for Android Programmers which controls the alpha level of any view. Alpha Animation is used to fade in and fade out a view.

Rotate Animation: An animation that controls the rotation of an object. This rotation takes place in the X-Y plane. You can specify the point to use for the center of the rotation, where (0,0) is the top left point. If not specified, (0,0) is the default rotation point.

Scale Rotation: An animation that controls the scale of an object. You can specify the point to use for the center of scaling.

Question 8. Define TimeInterpolator ?

Answer: A time interpolator defines the rate of change of an animation. This allows animations to have non-linear motion, such as acceleration and deceleration.

Question 9. What is Android API Level?

Answer: The API Level expressed by an application will be compared to the API Level of a given Android system, which may vary among different Android devices.

API Level is an integer value that uniquely identifies the framework API revision offered by a version of the Android platform.

Question 10. What is WebView ?

Answer: A View that displays web pages. This class is the basis upon which you can roll your own web browser or simply display some online content within your Activity. It uses the WebKit rendering engine to display web pages and includes methods to navigate forward and backward through a history, zoom in and out, perform text searches and more.

Question 11. Define SQLiteClosable ?

Answer: An object created from a SQLiteDatabase that can be closed. 

Question 12. Define SQLiteCursor ?

Answer: A Cursor implementation that exposes results from a query on a SQLiteDatabase. SQLiteCursor is not internally synchronized so code using a SQLiteCursor from multiple threads should perform its own synchronization when using the SQLiteCursor.

Question 13. Define SQLiteOpenHelper ?

Answer: A helper class to manage database creation and version management.

Question 14. Describe Adapter ?

Answer: An Adapter object acts as a bridge between an AdapterView and the underlying data for that view. The Adapter provides access to the data items. The Adapter is also responsible for making a View for each item in the data set.

Question 15. Define ArrayAdapter ?

Answer: A concrete BaseAdapter that is backed by an array of arbitrary objects. By default this class expects that the provided resource id references a single TextView. If you want to use a more complex layout, use the constructors that also takes a field id. That field id should reference a TextView in the larger layout resource.

Question 16. Classified the Web Service ?

Answer: Web services can be implemented in various ways. Web services can be classified as “Big” web services and “RESTful” web services.

  1. Big Web Service
  2. RESTful Web Service

Big Web Service: Big web services are based on SOAP standard and often contain a WSDL to describe the interface that the web service offers.

Big web services includes architecture to address complex non-functional requirements like transactions, security, addressing, trust, coordination, and also handles asynchronous processing and invocation.

Benefits of SOAP based Web Service…

  • Asynchronous processing
  • Reliability
  • Stateful operations

RESTful Web Service: RESTful web services are based on the way how our web works. REST— Representational State Transfer

REST is neither a standard nor a protocol. It is just an architectural style like say for example client-server architecture (client-server is neither a standard nor a protocol).

RESTful web services are based on HTTP protocol and its methods mainly PUT, GET, POST, and DELETE. These web services are better integrated with HTTP than SOAP-based services are, and as such do not require XML SOAP messages or WSDL service definitions.

Question 17. Difference Between HTTPGet and HTTPPost Method. 

Answer: HTTPGet is insecure way while HTTPPost is secure way to communicate with server.

In the HTTPGet, All the values that user sends to the server, embedded with the URL that we send as the request, where a third party can easily watch it. If I say it more technical way, by using the HTTP GET method, we are sending user details in the header part of the request not in the body.

In the HTTPPost, The reason is the content goes inside the body, not with the header as in GET method.I want to send some confidential data to a different server by using one of my native Android application.

Question 18. Describe Synchronous Task and Asynchronous Task.

Answer: In Synchronous Task , A program asks the system to perform a certain task, and then either waits or doesn’t wait for the task to finish.

AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers.

An asynchronous task is defined by a computation that runs on a background thread and whose result is published on the UI thread. An asynchronous task is defined by 3 generic types, called ParamsProgress and Result, and 4 steps, called onPreExecutedoInBackgroundonProgressUpdate and onPostExecute.

Question 19. Difference between Google Map V2 and Google Map V3 .

Answer: 

 

This entry was posted in Uncategorized by admin. Bookmark the permalink.

Leave a Reply