0% found this document useful (0 votes)
50 views

Android Interview

The document provides information about various Android concepts like broadcast receivers, databases, activities, fragments, services, and networking. It defines each concept, explains how to implement related tasks like starting/stopping components, passing data between them, and describes their lifecycles. It also includes material design components, terminology used in websites, and common interview questions on these topics.

Uploaded by

hitendra lal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Android Interview

The document provides information about various Android concepts like broadcast receivers, databases, activities, fragments, services, and networking. It defines each concept, explains how to implement related tasks like starting/stopping components, passing data between them, and describes their lifecycles. It also includes material design components, terminology used in websites, and common interview questions on these topics.

Uploaded by

hitendra lal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

1) what is broadcast receiver?

ans : It is a component of android, which is used to receive/ listen important system


events.

eg: BATTERY LOW, POWER CONNECTED, ....

2) How do you start a receiver?

ans : By using Intent, and sendBroadcast() method

3) How do you kill a receiver?

ans : abortBroadcast() method.

4) types of receivers?

ans : static receivers, dynamic receivers, ordered receivers, sticky receivers.

6) What are the life cycle methods of broacast receiver?

ans : onreceive()

Database related interview questions:

1. What is database?

ans : It is a logical container of data/ information.

2. Which database do we use in android?

ans : SQLite - RDBMS

3. Where is database stored?

ans : Database is stored within the application, in Internal memory.

4. How to store images/ audios/ videos in a table using SQLite?

ans : by using BLOB datatype = binary large object .

First we have to convert images to 0101, then store in tablee using BLOB data type. Later
while reading the image we will read 0101 and recreate the image by using
BitMapFactory class.

5. what is primary key?

ans : unique + not null.

Primary key is used to uniquely identify each row.

6. what is foreign key?

ans : used to maintain relationship between tables. If a primary key of one tables comes
to other table then it becomes foreign key.
Every RDBMS should support foreign key. But by default SQLite doesn’t have support
for foreign key. To enable foreign key support below command should be issued.

db.execSQL("pragma FOREIGN KEY;");

7. how to upgrade database? (imp)

ans :

a. change application version code and version name in build.gradle.

b. change database version in helper parameter.

c. go to inner helper class, go to onupgrade() method, use if-else condition and we can
add/ remove/ alter tables based on the version.

8. Difference between delete and drop? (imp)

ans : delete is DML statement. drop is DDL command.

drop = delete the rows + delete the table.

delete = will delete only rows.

9. Difference between update and upgrade?

ans : update is DML statement. but upgrade is related to DDL.

update = will update the rows.

upgrade = create table/ drop table/ alter table in the future application releases.

note : upgrade terminology is used for databases.

Activity & Fragment Interview questions:

1. how do you start an activity?

ans:Using intent class& startActivity() method

2. how do you start a fragment?

ans:by using FragmentManager, fragmentTransaction & add() method.

[or]

using <Fragment ..tag> in xml.

Note : first approach is dynamic fragment, 2nd is static fragment.

3. how do you kill an activity?

ans: finish() method

4. how do you kill a fragment?


ans:

fragmenttransaction.popBackstack() method [or]

fragmenttransaction.replace() [or]

fragmenttransaction.remove()

5. how do you pass data to an activity?

ans: By using Intent & putExtra() method.

6. how do you pass data to fragment?

ans: By using Bundle, setArguments() method.

6.1: What is fragment?

def: Fragment is a "re-usable UI component". Fragments are introduced in android 3.0.


Fragments are used to design UI for mobiles & tablets.

7. User clicks back button, which life cycle methods will be called for activity?

ans : onpause, onstop, ondestroy.

8. User clicks home button, which life cycle methods will be called for activity?

ans : onpause, onstop

9. User is looking at screen & suddenly call comes which life cycle methods will be called
for an activity?

ans : onpause, onstop

10. User rotates the phone, life cycle methods of an activity? [IMP]

ans : onpause, onsaveinstancestate, onstop, ondestroy,

oncreate, onstart, onrestoreinstancestate, onresume.

same for virtual kyeboard up/down & language changes also. same for low memory also.

11. write one line about each life cycle method.

oncreate()

a. first life cycle method

b. we will load screen design here

c. we will initialize all views here

onapuse()

a. when user is moving away from the screen this method will be called.
b. eg: popup displayed, new screen comes, etc..

c. important data has to be saved here. eg: saving database, saving files etc..

onsaveinstancestate()

a. this is called in configuration changes

b. eg: phone rotation, language changes, etc.

c. programmer has to save activity states here and restore in onRestoreinstancestate()


method.

12) What is the use of frgment?

ans: For designing applications for mobile phones & tablets, we use fragments.

Material Design Api classes & definitions:

CoOrdinatorLayout :

a. It is inherited from FrameLayout

b. It is used to place elements on one-on-top of other, with shadow/3d effect.

c. If coordinator layout is removed, then 3d layering will not happen properly.

AppBarLayout:

a. It is used to club ActionBar+Tabs.

b. It is used to have parallox effect on actionbar. Parallox effect means - when user scrolls
up / down, then actionbar will be moved out of screen.

ToolBar :

a. it is introduced in android 5.0

b. it is actionbar with shadow effect.

c. toolbar can be placed anywhere on the screen.in olden days, action bar used to stick at
top.

TabLayout :

a. it is used mostly with viewpager.

b. it inherits from horizontal scrollview.

c. mostly it is attached to actionbar/toolbar.

FloatActionButton:

a. it appears at right corner of the screen.


b. Most important item should be placed as FAB.

eg: gmail app places "compose mail" as FAB.

c. this is highest priority icon.

NagivationView :

a. It is used to attach sliding menu with actionbar.

b. it will have header and menu body portions.

SnackBar :

a. it is advanced version of Toast.

b. it comes with colors & buttons.

c. it can be swipe deleted. [not possible with toast

RecyclerView :

a. Advanced version of listview.

b. it is faster & memory efficient compared to list view.

c. It comes with viewholder design pattern.

d. can be used as listview/ gridview/ staggered grid

CardView :

a. it inherits from framelayout.

b. it is is used to design round cornered - cards, with 3d shadow effect.

c. mostly used along with recyclerview - to show good looking rows.

Network related questions:

1. what is URL api?

a) it is used to represent website url.

2. what is HttpUrlConnection api?

a) it is used to establish connection between android application & server.

3. what is InputStream api?

a) this API is used for GET request. if we want to read some data from server, we will use
this API. this is where the actual data will come from server.

Note : this may take some time, depending on internet connection.


4. what is InputStreamReader API?

a) it is used to convert/read the raw data [bits] coming in the input stream.

note : this api converts bits to ascii chars.

note : it is not efficient as it reads each character one by one.

5. what is BufferedReader API?

a) this api provides an efficient way to read data coming from server in big chunks, in
line by line fashion.

Note : InputStreamReader vs BufferedReader is interview question.

Terminology used in websites:

Server/Webserver : it is combination of hardware & software where websites [website


code] will run.

eg : apache webserver, tomcat webserver - for J2EE websites.

IIS webserver - for .NET websites.

webconfig : it is a small xml file in the server, which is similar to our android manifest
xml file. this xml file contains, which URL is mapped to which Servlet this xml file also
contains, which URL is mapped to which webservice.

Servlet : full form is serving the request.

Servlet is a small java file, which sits in server.

Servlet class will generally extend a predefined class HTTPServlet.

Servlet will handle all incoming requests from BROWSER.

Servlet is the first entry point in the server, which handles incoming request.

JSP : Java server pages. It is a small java file which sits in server. Main responsibility of
JSP class is to prepare HTML content.

MVC : Model View Controller, is a design pattern used while designing web sites.
Controller -is- servlet. View -is- JSP/ JSF. Model -is- Database connection logic.

WebServices: It is a small java file which sits in server.

Webservices will handle all incoming requests from non-browser applications.

Eg: if an android application sends a request to server, it most likely hits a web service.

Note : A website can have n-num of servlets/ webservices.

Note : Each servlet/ webservice will have one URL.

Types of webservices: RESTful & SOAP


RESTful Webservices: Representational State Transfer web services. Faster than
SOAP services. Most of the RESTful services uses JSON format to transfer the data.

SOAP: Simple object access protocol. Slower compared to REST. Mostly SOAP services
uses XML format to transfer the data.

HTTP : is a common language/ protocol used over internet for communicating between
client & server systems.

HTTPRequest : it is a class representing request going from client to server.

HTTPResponse : it is a class representing response coming from server to client.

interview questions on services

1. what is service?

ans : component android used to do background task.

eg: connecting to internet.

2. types of services?

ans : Service & IntentService

3. service life cycle methods?

ans : oncreate, onstartcommand, ondestroy, onbind.

4. what is intent service?

ans : Service with 1 background thread.

lifecycle methods - constructor, onhandleintent

5. how to kill a service?

ans : stopservice(intent);

6. what is a thread?

ans : thred is a light weight process [or]

thread is an independent path of execution.

7. thread vs service?

ans : thread is os component, service is android component

interview questions on services - part 2

1. what is ANR?

ans : Application Not Responding is a famous error


in android.

2. why ANR error will occur?

ans : if key events are not delivered in 5 seconds time limit, then O.S will show this error
popup to user.

3. What is the root cause for ANR errors?

ans : if service is not having its own thread, then service will use main thread for doing
background task. when main thread is busy in the service, it can't handle key events.
That leads to ANR.

4. what precautions to take to avoid ANR errors?

ans : when we create a service, create a thread also in the service.

Note : 1 thread handling too many taks is not good design.

Activities - will always use - MainThread.

Services - should always use - separate thread.

5. Some other scenarios where ANR may occur?

ans : opening, inserting, reading database in activity is danger. It might lead to ANR.

Activities - will use - main thread.

database - also using - main thread.

6. what is the time limit of ANR?

ans : 5 seconds. [set by google]

but phone manifacturer can reduce it for more efficiency. but should not increase it.

Shared preferences

1) What is preferences/ sharedPreferences?

ans : It is a small xml file which is used to store small amount of data permenantly.

eg: Storing user registration details/ credentials.

Note : we can only store primitive data types.

2) Which API we have to use to create a preference file?

ans : getSharedPreferences()

3) What is the 2nd parameter while creating

new preference file?


ans : 1st - file name, 2nd - PRIVATE MODE [0]

4) Which API we have to use to open preference file?

ans : getSharedPreferences()

5) Can I store array of strings in a preference file? how?

ans : putStringSet() - convert array to set and store.

6) How do you save a preference file?

ans : apply() [or] commit()

7) What is the difference between commit() & apply().

ans : commit() is slow, because it runs on main thread. apply() is fast, as it runs on
different thread.

8) Is preference files secured?

ans : yes, but we have to use 2nd parameter 0 - PRIVATE MODE

9) How do you store multiple user credentials using preferences?

ans : op1 : for each user create a seperate pref file.

op2 : use 1 pref file but use different keys/tags for each user -

et.putString("user1",...);

et.putString("user2",...);

10)List all the methods of SharedPreferences class?

ans : getInt, getstring, getboolean, getfloat, getlong, getStringset

11)List all the methods of Editor class?

ans : putint, putstring, putboolean, putfloat, putlong, putstringset, apply, commit

12)How to create a preference file without name?

ans : SharedPreferences sp = getSharedPreferences("abc",0);

SharedPreferences sp = getPreferences(0);

13)what is the extension of preference file?

ans : xml

14)Can other applications access our preference file?

ans : generally no.


a. if other app has root permission

b. if second parameter is 1/2 [world readable/writab]

15)Can other activity of same application access pref file?

ans : yes

Interview questions on starting screens:

1. How do you start other activity/ screen?

ans : Intent class, startActivity() method.

2. How do you pass data from one screen to other screen?

ans : putExtra() method.

3. What is Bundle?

ans : Bundle is a container which carries data.

4. How do you kill a screen?

ans : finish() method.

Interview questions on passing data:

1. How do we pass data from one screen to other screen?

a) using Intent class, & putExtra() method.

2. Is there any other way to pass data to other screen?

a) yes, Serialization. [For passing objects]

note : Serialization also uses intent & putextra.

3. What is Serialization?

a) The process of converting "java object -to- bits & bytes".

4. what is De-Serialization?

a) The process of converting "bits & bytes -to- java object".

5. what is Serializable?

a) It is a marker interface [empty interface] in JDK s/w.

6. What is difference between Serializable vs Serialization?

a) Serializable is predefined interface [empty] of java. Serialization is a process of


converting "java obj to bits". Serialization is done by JVM.
7) What is Parcellable?

a) It is predefined interface of Android.

8) What is parcelling? [or] what is the use of Parcellable?

a) Serialization is a java technique, which takes more memory and it is slower.


Parcellable is an android technique, to pass objects faster and with less memory wastage.

Company interview questions - part 1

1. DIF between ART & DVM

ans : ART is replacement for DVM, in android 5.0

ART is 4times faster than DVM.

ART uses Ahead of Time compiler, DVM uses JIT compiler

2. what is dx file, how it is generated?

ans : dx = dalvik executeable file.

generated by build.gradle.

apk = android application package file.

generated by apkgen tool.

3. what is intent-filter?

4. what is broadcast receiver?

ans : it is a component of android which is used to listen or receive important system


events.

ways : static - through xml

dynamic - through java code

5. where will you catch announcements / system events.

ans : using broadcast receiver.

6. what is content provider?

ans : it is used to share data from one application to other application.

eg : contact application is sharing numbers to whatsp

7. is there any other way to share data between 2 apps.

ans : using server. [or] cloud.

8. service life cycle methods?


ans : oncreate/ onstartcommand/ ondestroy.

9. types of services?

ans : service & IntentService.

10. when to service & when to use intentservice?

ans : Service does not come with default thread. Service depends on Main thread. Service
has 4 life cycle methods. Using only service will lead to ANR error. Service need to be
stopped explicitly either by stopserver [or] stopselfresult() methods.

IntentService class inherits from Service class. IntentService class comes with one
thread. Using IntentService solves ANR problem. IntentService will kill itself when there
are no more requests to start the service.

Some java related questions asked for android engineers:

1. dif between abs class & interface.

ans : abstract class can have abstract methods & concrete methods. abstract class is
partial abstraction. Abstract class should be extended. interface can have only method
declarations. interface is used to achieve pure abstraction. interface should be
implemented.

2. dif bw hashmap & hashtable?

ans : HashMap part of collection framework library.jdk1.2

HashTable is legacy class. JDK 1.0

HashMap allows 1 null key, but HashTable will not.

HashMap is not synchronized, HashTable is synchronizd

Some more android questions

1. what is intent? types of intent?

ans : Intent is predefined class which is used to start other activities.

types : implicit, explicit, pending, sticky.

2. how will you start activity if you are expecting data back?

ans : startactivityforresult(in, requestcode).

3. what is child activity?

ans : Each screen in android is called as an activity.

4. can we use intent to start content provider?

ans : using intent you can start activity/service/receiver. we can't start content providers
using intent. We use ContentResolver to start content provider.
5. does java support multiple inheritance?

ans : no for class, yes for interfaces. because it leads to function ambiguity.

6. how many ways we can store data in android. What all the different data storage
options available in android?

ans : preferences[offline], sqlite db [offline], server[online], cloud[online], sd


card[offline], internal memory[offline].

7. what manifest file contains?

ans : <manifest>

<uses-permission>

<application>

<activity>

<intent-filter>

8. types of access modfiers?

ans : private, default, protected, public.

9. can we access protected variables in child class?

ans : yes.

10. string vs stringbuilder vs stringbuffer

ans : Strings are immutable, stored in s.c.pool

stringbuilder is mutable, stored in heap, not sync

stringbuffer is mutable, stoerd in heap, synchronized

Interview questions part 2:

1. What is activity & write activity life cycle methods?

ans : Each screen in android is an Activity.

2. what is fragment & write fragment life cycle methods?

ans : fragment is a modular & reusable UI component.

[or]

fragment is used to design screens/applications for

mobles & tablets.

3. write string polyndrome logic?


ans :

4. User is going back from second activity to main activity, draw life cycle methods?

ans : onrestart, onstart, onresume

5. what is recyclerview?

ans : RecyclerView is introduced in MaterialDesign [5.0]

RecyclerView is faster than ListView, because of

ViewHolder design pattern.

6. how to pass data from one activity to other?

ans : intent, putextra.

7. what is intent filter?

ans : <intent-filter> tag will be in manifest file.

use case not yet covered. will be covered later.

8. what is broadcast receiver? can we create custom

broadcast receiver?

ans : it is component of android. it is used to receive important system events.

eg : I want to listen charger plugged.

eg : I want to listne when battery low.

9. what is asynctask? and draw life cycle methods of async task?

ans : It is used to create threads in android application.

onpreexecute, doinbackground, onprogressupdate, onpostexecute.

10.What are the components of android?

ans : activity, service, Broadcast Receiver, ContentProvider.

11.what is database.

ans : Database is a container of data in table format.

12.what is service? how many types of services are there?

ans : Service is a component of android, Which is used to do background task.

types : Service and IntentService.

Interview questions part-3:


1. What is activity & Intent?

ans : Each screen in android is an Activity.

Intent is a predefined class of android, which is used to start other activities & pass data.

2. Difference between activity & Intent?

ans : Activity is a component of android, it has life cycle methods. Intent is a predefined
class to start activities.

3. Explain different types of intents?

ans : 4.

Implicit Intent, Explicit Intent, Pending Intent,

Sticky Intent.

4. What is the use of ViewGroup?

ans : ViewGroup is a predefined class extending from View class

It is used to design screens.

Eg of viewgroups - LinearLayout, FrameLayout, RelativLayout, AbsoluteLayout is


deprecated.

5. What are different types of notifications?

ans : will be covered later

6. What is GCM notification & what is the Use?

ans : will be covered later

7. What is the us of 9-Patch image?

ans : 9-patch images are scalable, without loosing resolution.

nine patch image extension is .9.png

draw9patch.exe file is used to generate 9 patch image.

8. What is launcher activity?

ans : It is the starting screen that gets started, when user opens the applicaiton.

10. How to set first/ default screen?

ans : by going to manifest file, use <intent-filter> with

<category .. LAUNCHER> & <action...MAIN>

9. How to change application language based on phone location?


ans : will be covered later.

11. what is the use Manifest file?

ans : Without manifest, our application & activities will

not start.

12. Tell me about Build.gradle?

ans : already covered.

Interview questions part-4:

1. what is android?

ans : it is an o.s for mobiles and tablets [or]

it is a software which contains 4 layers.

os/ libraries/ framework/ applications.

2. what is a fragment?

ans : fragment is a modular & reusable UI component.

[or]

fragment is used to design screens/applications for

mobles & tablets. i.e for portatit mode & landscape

mode.

3. what is a recycler view?

ans : RecyclerView is introduced in MaterialDesign [5.0]

RecyclerView is faster than ListView, because of

ViewHolder design pattern.

4. how will you pass the data?

ans : Using intent & putextra() - between activities.

[or] bundle & setarguments() - activity to fragment.

5. what is bundle?

ans : bundle is a container which stores data in key,val pairs

we will use Bundle in onsaveinstancestat &

onrestoreinstancestate, when user rotates the phone.


6. what is manifest file?

ans : this file contains <manifest> tag, <application> tag

<activity..> tags.

this file also has <intent filter>

this file also has <uses-permission > tag.

it talks about application components.

7. what is build gradle?

ans : It is a tool/program, which comes along with android

studio, which generates apk file.

In build.gradle, in dependencies section we will

keep libraries used in the application.

eg : YouTubeAndroidPlayerApi.jar

compile 'com.support.recyclerview:26+'

compile 'com.support.cardview:26+'

...material design...

...google maps...

...appcompat v7...

8. what is zomato app?

ans :

9. how do you design 20% overlapping 2 images?

ans : framelayout

10. what are the methods of asynctask? [100%]

ans : onpreexecute, doinbackground, onprogressupdate,

onpostexecute.

11. what is joins?

ans : outer join, inner join, self join.

12. what do you do onpostexecute?

ans : .....
13. how do you use http request/ http response?

ans : .....

14. when I open application, how many life cycle

methods will be called?

ans : oncreate, onstart, onresume.

15. when we press home button what happens?

ans : onpause, onstop will be called.

note : activity is not destroyed, it is still in memry.

January update :
250 Android Interview Questions

Questions of this month:


What is assert? Where will you use it?
How do you find memory leaks in android application?
Tell me any exception which you have handled in your application?
What care will you take while designing an application for both mobiles and tablets?
How will you design a listview, which downloads lot of images and displays in it? (with
out getting your app hanged), whats the best possible way?
How will you find if your application is running on low memory, or out of memory?
How will you design a textview, which works properly for both mobiles and tablets?
I wanted to do show a splash screen in my application only once for the first time when
user downloads my application. How do you design it? What logic will you use for it?

For android tutorials and sample programs refer : Android tutorials point

December 2014 Updates:


Now you can avail all android interview questions on your android mobiles: FAQs for
Android™ developers - 500 android interview questions
Java Programs and Questions - 1100 java interview questions
Interview FAQs for Android™ PRO version. - 1700 (Android+java questions)
from play store.

I will keep upgrading all apps with more questions as and when required.

Note: all questions are available in android interview questions and answers -
skillgun web site also

November 2014 Updates:


Recently Google has released its latest 5.0 android version with Lollipop.
New major features added in 5.0:
1. Added a new material design theme (with z-axis shadow effect for the views). Material
design gives similar UI effect for your android application on different screen sizes
(Tablets, Phones, Watches, TVs etc).
Here is the Google Material Design concept.
2. ListView has been replaced by RecyclerView, with better optimization.
RecyclerView | Android Developers
3. Introduced a new CardView.
Note: Both RecyclerView & CardView are AdapterViews.
4. Notifications can be seen now on locked screen as well.
5. DVM has been officially replaced by ARM (Android Run Time), which is roughly 4-
times faster than DVM. (Bye Bye to DVM).
6. Support for Living room devices (like TV).
7. Android companies slowly started using android studio, rather than eclipse.
If you are planning as an android developer, better move off to Android Studio | Android
Developers

Question of this week:

Is it possible to have a fragment with out an activity?

August 8th 2014 Updates : Added Excellent set of exp questions asked in Provab,
Mindtree, and Digipay. see at the end. Especially in Provab they have asked excellent set
of questions, which I hardly seen before.

*Note: If you are experienced person appearing for android interview, request you to
update questions asked in your interview, so that I can add answers to them and will
share here with latest releases.

This list of questions are based on my interview experience with various people. Below
are the most commonly asked android interview questions. If you can answer at least
60% of these questions, that is more than enough.

If you are looking for fresher android interview questions, then:


Android interview questions

Android section:
1. Activity life cycle - Can I save all my database updates in onStop()?
ans: check
2. What is the difference between this and getapplicationcontext?
ans: check
3. What is the UI response time limit in android?
ans: check
4. What is ANR?
ans: check
5. What is Bundle? How it is different from parcel?
ans: check bundle. also check android how serializable differ from parcel
6. How to write a custom adapter?
7. How to fix an android application crash? How to analyze a crash using logcat?
ans: check
8. What is a singleton class?
ans: check. also see how to create a singleton class in java
9. What is sleep mode?
ans: check
10. How to save UI states in case of configuration changes? (eg: screen orientation
changes).
11. What is a fragment? How it differs from activity?
ans: check and difference between activity and fragment
12. How to parse JSON data that is coming from a server?
13. What is 9 patch image? when to use it?
ans: check
14. What does "compatibility issue" means?
15. How will you write an application which fits both for mobiles and tablets?
ans: check - 10th question.
16. What is the Memory limit of each process in android?
ans: check
17. What kernel is used in android?
ans: check and what type of kernel is used in android
18. How to fetch a contact person number from contact application using content
provider?
ans: check
19. How to upgrade data base tables in the later versions of an application?
ans: check
20. What is the difference between dynamic receiver and static receiver? when will you
use dynamic broadcast receivers?
ans: Dynamic broadcast receivers: Android tutorial
21. What is intent, pending intent, and sticky intent?
ans: check
22. What is the difference between thread and a service?
ans: check and also what is the difference between thread and handler thread in android
23. How will you create an async task?
ans: check
24. What is a handler thread? how it is different from normal thread?
ans: check
25. What is looper, handler, and message queue?
ans: check
26. What is serialization? How serialization is different from Binders?
ans : check serialization also check how serializable differ from parcel.
27. What is aidl?
28. How to update UI from a service?
ans : Use a dynamic broadcast receiver in the activity, and send a broadcast from the
service. Once the dynamic receiver is triggered update UI from that receiver.
29. How to update UI from other thread?
ans: check
30. How to pass data between 2 components of android?
ans: use putExtras() and pass in the intent.
31. What is a binder service? how it differs from started service?
32. To write a back ground functionality in an activity, should I use a thread or service?
ans: check
33. What is ANR? What is the cause of ANR and how will you rectify this problem?
ans: check
34. How to do inter-thread communication in android, using handlers?
ans: check
35. How to create a service with single thread?
ans: check
36. Why android uses DVM, why not JVM?
ans: check what is the full form of dvm and difference between dvm and jvm why
android opted for dvm?
37. How will you display database tables in an activity? will you use gridview or
tableview? justify?

You might also like