You are on page 1of 6

1.

How to get contact phone number from contacts application


content provider?
A Use ContactsContract.Contacts.URI and request through content resolver
B Use Contact.Phone.URI and request through content resolver
C Use ContactsContract.Contacts.URI and CommonDataKinds.Phone.Content_URI,
then Use ContactsContract.Contacts.URI
D none

2. What is difference between this context and getApplication


context?
A no difference, both are same
B this points to entire process and getApplication points to current class
C this points to current context and getApplication to entire process
D both option 2 and 3 are correct

3. Why does ANR occur?


A will occur with heavy functionality along with UI in single main thread. If two
heavy functionalities are used in single main thread it will delay response to user
actions hence irritating the user and to stop the process
B will occur if we are running UI in other workers thread, Since other threads should
not touch thus closing the application
C will occur with heavy functionality along with UI in single main thread. Two
functionalities cannot use single threadas one thread can handle only one
functionality
D will occur if we are using heavy functionality along with UI in single main thread

4. What is Sticky intent?


A Sticks with android for future broadcast listeners
B is a message passing mechanism between components of android

C will be used when someone wants to use intent in future


D none is true
5. Which of these are not one of the three main components of the
APK?
A.
Webkit
B.

Native Libraries

C.

Resources

D.

Dalvik Executable

6. What is a funny fact about the start of Android?


A. It was orginaly going to be called UFO
B. The first version of Android was released without an actual phone on the market
C. Androids main purpose was to unlock your car door when you left the keys inside
of it.
D. Was going to be a closed source application to make more money for its
company.
Ans: B
7. Can I save all database updates using onStop() of activity?
A Yes, we can
B No, save it on SaveInstance state
C No because onStop() will never be called
D No, because onStop() will not be called in some situations
8. Maximum memory limit for each process or application in android?
A 8 MB
B 16 MB
C 32 MB
D 64 MB
9. 9 patch image will

A scale the image according to the device size on which app is loaded
B will make the image size smaller as compared to the png image
C is used for security purpose for the images used in project
D all of the above options are true
10.

Sleep mode is

A phone swithed off. CPU will not work when LCD is off
B CPU will be sleeping. CPU will not work when LCD is off
C CPU will be sleeping. CPU will not work after few seconds of LCD turning off.
D CPU will sleeping but will not accept any command except RIL
11.

Type of kernel used in android

A Micro Kernel
B Monolithic kernel
C Hybrid Kernel
D none
12.What does the .apk extension stand for?
A. Application Package
B. Application Program Kit
C. Android Proprietary Kit
D. Android Package
Ans: A
13. The ___________ file specifies the layout of your screen
A. Layout file
B. Manifest file
C. Strings XML
D. R file
Ans: A
14.Which of the following is the most "resource hungry" part of dealing with
Activities on Android.
A. Closing an app
B. Suspending an app
C. Opening a new app
D. Restoring the most recent app
Ans: C
15.Which of the following is NOT a state in the lifecycle of a service?
A. Starting
B. Running
C. Destroyed
D. Paused

Ans: D
16. Why are the so few users left with versions 1.0 and 1.1?
A, The first phones were released with version 1.5
B. 1.0 and 1.1 had security holes that forced carriers to recall phones using them
C. 1.0 and 1.1 are just number designations for the version Apple's iPhone is
running
D. Everyone with 1.0 and 1.1 were upgraded to 1.5 over the air automatically
Ans: D
17.Parent class of Activity?
a)Object
b)Context
c)ActivityGroup
d)ContextThemeWrapper
Ans) d
18.What is the difference between Activity context and Application
Context?
a) The Activity instance is tied to the lifecycle of an Activity.
while the application instance is tied to the lifecycle of the application,
b) The Activity instance is tied to the lifecycle of the application,
while the application instance is tied to the lifecycle of an Activity.
c) The Activity instance is tied to the lifecycle of the Activity,
while the application instance is tied to the lifecycle of an application.
d) None of the above
Ans) a
19.your service is private to your own application and runs in the same
process as the client (which is common), you should create your
interface by extending the ________class?
a) Messenger
b) Binder
c) AIDL
d)None of the above
Ans) b
20.
A 5 sec
B 1 sec
C 10 sec
D 2 sec
Ans A

What is UI response time limit in android?

21.
How to update UI from thread?
A It is not possible for other threads to manipulate UI
B They can hold lock on UI control and manipulate. Holding lock is to make sure
others are not touching it
C Request main thread through inter thread communication using handlers or

runonUIThread() function and manipulate UI


D Keep UI control in shared memory, which has to be shared and let all the thread
manipulate it
22.
To write a back ground functionality in an activity, should I use
a thread or service?
A thread is better as ong as the thread is closely related to UI and claning and
closing of thread is done properly
B service is better as threads in activity have less priority than threads in service
C either 1 or 2
4 None
23.
What does the .apk extension stand for?
A. Application Package
B. Application Program Kit
C. Android Proprietary Kit
D. Android Package
Ans: A
24.
Which among these are NOT a part of Android's native
libraries?
A. Webkit
B. Dalvik
C. OpenGL
D. SQLite
Ans: B
25.
When an activity doesn't exist in memory it is in.
A. Starting state
B. Running state
C. Loading state
D. Inexistent state.
Ans: A
26.
While developing Android applications, developers can test
their apps on?
A. Emulator included in Android SDK
B. Physical Android phone
C. Third-party Emulators (Youwave, etc.)
D. All three options will work.
Ans: D
27.
What is contained within the manifest xml file?
A. The permissions the app requires
B. The list of strings used in the app
C. The source code
D. All other choices
Ans: A
28.
How to fix an android application crash?
A I will put logcat and analyze it
B After crash, logcat will contain exception name along with line number

C I will ut a break point and analyze


D After crash logcat will contain filename where it crashed.
29.
What was the main reason for replacing the Java VM with the
Dalvik VM when the project began?
A. There was not enough memory capability
B. Java virtual machine was not free
C. Java VM was too complicated to configure
D. Java VM ran too slow
Ans: B

30. How to pass data between 2 components of android?


A use putExtras() and pass in the sticky intent.
B use putExtras() and pass in the intent.
C use putExtras() and pass in the pending intent
D none
ans: B

You might also like