Sie sind auf Seite 1von 5

3/13/2014

android interview questions and answers for experienced


Like 195 people like this. Sign Up to see w hat your friends like.

First time user? Register | Sign In

Home

Submit/Ask Question

How to Use

Show my Statistics

Contact Us

Select chapter
Android All (31.Papers) basics (5.Papers) activities (5.Papers) services (2.Papers) threads (2.Papers) receivers (1.Papers) Show all chapters

Previous page

0 Says Important

0 People Like it

RateToughness

Sponsored Links

Experienced interview question 41 What is the difference between startservice and bindservice? Toughness

A. started service - runs in background for ever unless some one or itself stops. it is used to perform long running operation. Binded service - is alive as long as some one binds to it and interacts with it. binded services can return value to the person who bound to it. B. started service - runs in background for ever unless some one stops. started services can return values to person who started it. Binded service - is alive as long as some one binds to it and interacts with it, and after work is done, the person who has bind to it has to unbind it. C. started service - runs in background for ever in different thread. Binded service - is alive in separate thread as long as some one binds to it and interacts with it D. started service - run sin background and is alive as long as the component who started is also alive. Binded service - is alive in background as long as component who connected to it is also alive.

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 42 To do some back ground functionality in an activity, which is better ? thread or service? Toughness

A. thread is better as long as thread is closely related with your UI and as long as programmer make sure that cleaning and creation of thread is done properly. B. it is better to use services with thread, because threads in activity will have less priority compared to thread in a service in case if that activity is in background or stopped state. more over in case of low memory if it kills thread in activity, there is no way that android will recreate it. all these disadvantages are overcome in services with android.

Payroll & Salary Software


www.gre ytip.in O nline Payslips, PF/ESI/TDS. 2000+ satisfie d clie nts. Fre e trial

C. you can either use option 1 or option 2, based on your requirement. But most of the times it is better to use option 2. D. Both thread and service are back ground components, so you can use either of them.

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 43 What is ANR (application not responding)? What is the reason for this problem and what is the solution for that

problem?
Toughness

A. ANR - will occur if we are doing any other heavy functionality along with UI in single Main Thread. If two heavy functionalities happen in single thread, it will delay response to user actions, which may irritate user, and hence stop your process. Solution - Run only UI components in Main Thread.

http://skillgun.com/android/interview-questions-and-answers-for-experienced#

1/5

3/13/2014

android interview questions and answers for experienced


Solution - Run only UI components in Main Thread. B. ANR - will occur if we are running UI in other worker threads.Since other threads should not touch UI, it may close your application. Solution - never touch UI components from other than Main Thread. C. ANR - will occur if we are doing any other heavy functionality along with UI in single Main Thread.If two heavy functionalities happen in single thread, it will close UI because a thread can do single functionality. Solution - Run only UI components in Main Thread. D. ANR - will occur if we are doing any other heavy functionality along with UI in single Main Thread.If two heavy functionalities happen in single thread, it will delay response to user actions, which may irritate user, and hence stop your process. Solution - Never have two heavy functionalities in your application at a time.

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 44 Main thread will have a looper. True or false? Toughness

A. yes every thread by default will have looper B. no only handler threads will have loopers C. only main thread will have looper D. only handler threads will have loopers, but we can prepare normal threads looper also.

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 45 How Android inter thread communication works? Toughness

A. Not allowed in Android B. Can achieve through normal threads. Create 2 threads and post messages between them. C. Possible through only Handler Threads. Because Handler threads allows message passing mechanism through loopers. D. Option 3 is right, with out handler threads also one can achieve with normal threads if programmer prepares its looper programmatically.

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 46 What is the difference between thread and handler thread, in android? Toughness

A. Thread will have looper and Message Queue. Default this looper will be prepared to handle incoming messages from other threads. B. Handler thread will have looper and MessageQueue, but looper is prepared to handle incoming messages. C. Both are same. No difference, but HandlerThread is sub class of Thread class. D. Both are same. No difference, but HandlerThread is super class of Thread class.

http://skillgun.com/android/interview-questions-and-answers-for-experienced#

Show Answer and Explanation

2/5

3/13/2014

android interview questions and answers for experienced


Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 47 Does android support multitasking? How multitasking works in android, explain how to start a new task when

you are already running a task?


Toughness

A. No, Android doesn't support multi tasking. But multi threading is possible. B. Android supports multi tasking, but only at system level, its not available for the programmers. C. Android supports multitasking at app level also. press home button on current task which will move it to background and then you can start new task from launcher. D. option 3 is right, along with that there is one more way to start a new task by using FLAG_NEW_TASK when you are starting a new activity.

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 48 What is looper, message queue, and a Handler? Toughness

A. Looper - part of any Thread to loop through message queue. Message Q - part of any thread, will store incoming & outgoing messages to this thread. Handler - communication channel between threads. we can use only one handler to communicate between any thread. B. Looper - part of any Thread to loop through message queue. Message Q - part of any thread, will store incoming messages to this thread. Handler - communication channel between two threads. C. Looper - part of any Thread to loop through message queue. default every thread will have this looper activated. Message Q - part of any thread, will store incoming messages to this thread. Handler - communication channel between two threads. D. Looper - part of any Thread to loop through message queue. default every thread will have this looper activated. Message Q - part of any thread, will store incoming messages to this thread. Handler - communication channel between two threads.For a given thread we should have only one handler.

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 49 How to avoid synchronization problems in threads? Toughness

A. Use synchronized block C. Use synchronized threads

B. Use Synchronized methods D. both option 1 and 2 is right.

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 50 how many threads will be created with asynctask?

http://skillgun.com/android/interview-questions-and-answers-for-experienced#

Toughness

3/5

3/13/2014

android interview questions and answers for experienced


Toughness

A. asynctask is used to do multi threaded programming, so it creates multiple threads. B. it creates only single thread, no matter how many objects you created for asynctask class. C. till donut - it is used to create single thread, from 1.6 to 2.3 - it is used to create multi threads, from 3.0 on wards - it is again used to create single thread. D. it won't create any thread.

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 51 How to create a service with single thread? should I use IntentService or AsyncTask? Toughness

A. Use IntentService, if you don't want to interact with UI. B. Use AsyncTask if you want to interact with UI. C. both option 1 and option 2 are correct. D. none

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 52 What is dx tool in android? Toughness

A. Used to compile android java files.

B. tool used to run android applications.

C. converts all .class files to dvm understandable format, i.e dex D. all of the above

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 53 What is the difference between Activity context and Application context ? Toughness

A. The activity instance is tied to the lifecycle of an application while the application instance is tied to the lifecycle of an application. B. The activity instance is tied to the lifecycle of an activity while the application instance is tied to the lifecycle of an application. C. No difference. D. None are correct.

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

http://skillgun.com/android/interview-questions-and-answers-for-experienced#

4/5

3/13/2014

android interview questions and answers for experienced


Experienced interview question 54 What is JNI ? Toughness

A. Java Network Interface used for low level Java programming. B. Java Native Interface that enables Java to call native application written in C,C++. C. Java Network Interchange used for Java networking. D. None are correct.

Show Answer and Explanation

0 Says Important

0 People Like it

RateToughness

Experienced interview question 55 Which of the important device characterstics that you should consider asyou design and develop your

application ? i. Screen Size and Density ii. Input Configurations iii. Platform Version iv. Device Feature
Toughness

A. i C. i, ii, iii

B. i and ii D. All

Show Answer and Explanation

Interview Skill

Job Interview

Android Developer

Android SDK

2014 Palle Technologies Terms of Service PrivacyPolicy About Us Report Bug

Bookmark to -

http://skillgun.com/android/interview-questions-and-answers-for-experienced#

5/5

Das könnte Ihnen auch gefallen