Adv. Android Application Development.
Click here to Download this file
Multiple Choice  Question and Answers:-

1. Once installed on a device, each Android application lives in_______?
a) device memory
b) external memory
c) security sandbox
d) None of the above

Ans:C

2. Parent class of Activity?
a) Object
b) Context
c) ActivityGroup
d) ContextThemeWrapper

Ans:D

3. What are the Direct subclasses of Activity?
a) AccountAuthenticatorActivity
b) ActivityGroup
c) ExpandableListActivity
d) FragmentActivity
e) ListActivity
f) all the aove

Ans:F

4. What are the indirect Direct subclasses of Activity?
a)LauncherActivity
b)PreferenceActivity
c) TabActivity
d)All the above

Ans:D

5. Parent class of Service?
a) Object
b) Context
c) ContextWrapper
d) ContextThemeWrapper

Ans:C

6. What are the indirect Direct subclasses of Services?
a) RecognitionService
b) RemoteViewsService
c) SpellCheckerService
d) InputMethodService

Ans:D

7. Which component is not activated by an Intent?
a)Activity
b)Services
c)ContentProvider
d)BroadcastReceiver

Ans:C

8. When contentProvider would be activated?
a) Using Intent
b) Using SQLite
c) Using ContentResolver
d) None of the above

Ans:C

9. Which of the  important device characteristics that you should consider as you design and develop your application?
a)Screen size and density
b)Input configurations
c)Device features
d)Platform Version
e)All of the above

Ans:E

10. Which are the screen sizes in Android?
a) small
b) normal
c) large
d) extra large
e) All of the above

Ans:E

11. Which are the  screen densities in Android?
a) low density
b) medium density
c) high density
d) extra high density
e) All of the above

Ans:E

12. You can shut down an activity by calling its _______ method
a) onDestory()
b) finishActivity()
c) finish()
d) None of the above

Ans:C

13. 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

14. Which one is NOT related to fragment class?
a) DialogFragment
b) ListFragment
c) PreferenceFragment
d) CursorFragment

Ansa:D

15. Definition of Loader?
a) loaders make it easy to asynchronously load data in an activity or fragment.
b) loaders make it easy to synchronously load data in an activity or fragment.
c) loaders does not make it easy to asynchronously load data in an activity or fragment.
d) None of the above.

Ans:A

16. Characteristics of the  Loaders?
a) They are available to every Activity and Fragment.
b) They provide asynchronous loading of data.
c) They monitor the source of their data and deliver new results when the content changes.
d) They automatically reconnect to the last loader's cursor when being recreated after a configuration change. Thus, they don't need to re-query their data.
e) All of the above.

Ans:E

17. How many ways to start services?
a) Started
b) Bound
c) a & b
d) None of the above.

Ans:C

18. If 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

19. If you need your interface to work across different processes, you can create an interface for the service with a ________?
a) Binder
b) Messenger
c) AIDL
d) b or c

Ans:D

20. AsyncTask allows you to perform asynchronous work on your user interface. It performs the blocking operations in a worker thread and then publishes the results on the UI thread.
a)true
b)false

Ans:A

21. Layouts in android?
a)Frame Layout
b)Linear Layout
c)Relative Layout
d)Table Layout
e)All of the above

Ans:E

22. Dialog classes in android?
a)AlertDialog
b)ProgressDialog
c)DatePickerDialog
d)TimePickerDialog
e)All of the above

Ans:E

23. If you want share the data accross the all applications ,you should go for?
a)Shared Preferences
b)Internal Storage
c)SQLite Databases
d)content provider

Ans:D

24. Difference between android api and google api?
a)The google API includes Google Maps and other Google-specific libraries. The Android one only includes core android libraries.
b)The google API one only includes core android libraries. The Android  includes Google Maps and other Google-specific libraries.
c)None of the above.

Ans:A

25. How to pass the data between activities in Android?
A)Intent
B)Content Provider
C)Broadcast receiver
D)None of the Above

Answer : A

25- On which thread services work in android?

A) - Worker Thread

B - Own Thread

C - Main Thread

D - None of the above.

Answer : C

26 -How to pass the data from activity to services in android?

A) - We can store the data in a common database and access the data on services as well as in Activity

B - We can't pass data from activity to services.

C - Using putExtra() method in intent, we can pass the data using setResult()

D - A & C

E - None of the above

Answer : D


27 - How many applications are there in a given task in android?

A) - Two

B - One

C - Many

D - Zero

Answer : C

28 -Which permissions are required to get a location in android?

A) - ACCESS_FINE and ACCESS_COARSE

B - GPRS permission

C - Internet permission

D - WIFI permission.

Answer : A

29 - What is APK in android?

A)- Android packages

B - Android pack

C - Android packaging kit

D - None of the above.

Answer : C

30 - Data can be read from local source XML in android through

A) - XML resource parser

B - XML pull parsing

C - DOM parsing

D - None of the above

Answer : A

31 - What is sandbox in android?

A) - Each application runs securely in sandbox without interrupting another process

B - Android Box

C - Android development tool kit

D - None of the above

Answer : A

32 - Why don't we give MIN SDK as 1 in android?

A)- Android deprecated version

B - There is no value for 1

C - Android doesn't allow min version 1

D - None of the above

Answer : A

33- What is a thread in android?

A) - Same as services

B - Background activity

C - Broadcast Receiver

D - Independent dis-patchable unit is called a thread

Answer : D

34 - Explain android activity life cycle?

A) - onCreate() −> onStart() −> onActivityStarted() −> onResume() −> onPause() −> onStop() −> onActivityDistroy() −> onDestroy()

B - OnCreate() −> onStart() −>onResume() −> onPause() −> onStop() −> onRestart() −> onDestroy()

C - OnCreate() −> onStart() −> onPause() −> onResume() −> onStop() −> onDestroy()

D - −>onResume()

Answer : B

35 - What is the difference between margin and padding in android layout?

A) - Margin is specifying the extra space left on all four sides in layout

B - Padding is used to offset the content of a view by specific px or dp

C - Both A and B are correct

D - None of the above

Answer : C

36 -What are the functionalities of Binder services in android?

A) - Binder is responsible to manage the thread while using aidl in android

B - Binder is responsible for marshalling and un-marshalling of the data

C - A & B

D - Binder is a kind of interface

E - None of the above

Answer : C

37 - What is the difference between content values and cursor in android SQlite?

A) - Content values are key pair values, which are updated or inserted in the database

B - Cursor is used to store the temporary result.

C - A & B

D - Cursor is used to store data permanently.

E - Content values are used to share the data.

Answer : C

38 - What is an anonymous class in android?

A) - Interface class

B - A class that does not have a name but have functionalities in it

C - Java class

D - Manifest file

Answer : B

39 - What is breakpoint in android?

A) - Breaks the application

B - Breaks the development code

C - Breaks the execution.

D - None of the above.

Answer : C

40 - What is the package name of JSON?

A) - com.json

B - in.json

C - com.android.JSON

D - org.json

Answer : D

41 - Fragment in Android can be found through

A) - findByID()

B - findFragmentByID()

C - getContext.findFragmentByID()

D - FragmentManager.findFragmentByID()

Answer : D

42 - Is it mandatory to call onCreate() and onStart() in android?

A) - No, we can write the program without writing onCreate() and onStart()

B - Yes, we should call onCreate() and onStart() to write the program

C - At least we need to call onCreate() once

D - None of the above

Answer : A

43 - Can a class be immutable in android?

A) - No, it can't

B - Yes, Class can be immutable

C - Can't make the class as final class

D - None of the above

Answer : B

44 - On which thread services work in android?

A - Worker Thread

B - Own Thread

C - Main Thread

D - None of the above.

Answer : C

45 -What are the functionalities of Binder services in android?

A - Binder is responsible to manage the thread while using aidl in android

B - Binder is responsible for marshalling and un-marshalling of the data

C - A & B

D - Binder is a kind of interface

E - None of the above

Answer : C

46 - What is sleep mode in android?

A - Only Radio interface layer and alarm are in active mode

B - Switched off

C - Air plane mode

D - None of the Above

Answer : A

47 - How to get current location in android?

A - Using with GPRS

B - Using location provider

C - A & B

D - SQlite

E - Network servers

Answer : C

48 - WHich method is used to find GPS enabled or disabled pro-grammatically in android?

A - finish()

B - getGPSStatus()

C - onProviderDisable()

D - getGPS().

Answer : C

49 - What is the package name of HTTP client in android?

A - com.json

B - org.apache.http.client

C - com.android.JSON

D - org.json

Answer : B

50 - What is the HTTP response error code status in android?

A - status code < 100

B - status code > 100

C - status >= 400

D - None of the above

Answer : C

51 - How many protection levels are available in the android permission tag?

A - There are no permission tags available in android

B - Normal, kernel, application

C - Normal, dangerous, signature, and signatureOrsystem

D - None of the above

Answer : C

52 - What is a thread in android?

A - Same as services

B - Background activity

C - Broadcast Receiver

D - Independent dis-patchable unit is called a thread

Answer : D

53 - Explain android activity life cycle?

A - onCreate() −> onStart() −> onActivityStarted() −> onResume() −> onPause() −> onStop() −> onActivityDistroy() −> onDestroy()

B - OnCreate() −> onStart() −>onResume() −> onPause() −> onStop() −> onRestart() −> onDestroy()

C - OnCreate() −> onStart() −> onPause() −> onResume() −> onStop() −> onDestroy()

D - −>onResume()

Answer : B

54 - What is Manifest.xml in android?

A - It has information about layout in an application

B - It has the information about activities in an application

C - It has all the information about an application

D - None of the above

Answer : C

55 - What is the difference between services and thread in android?

A - Services performs functionalities in the background. By default services run on main thread only

B - Thread and services are having same functionalities.

C - Thread works on services

D - None of the above

Answer : A

56 - How many broadcast receivers are available in android?

A - sendIntent()

B - onRecieve()

C - implicitBroadcast()

D - sendBroadcast(),sendOrderBroadcast(),and sendStickyBroadcast().

Answer : D

57 - How to get current location in android?

A - Using with GPRS

B - Using location provider

C - A & B

D - SQlite

E - Network servers

Answer : C

58 - What are the debugging techniques available in android?

A - DDMS

B - Breaking point

C - Memory profiling

D - None of the above.

E - None of the above.

Answer : D

59 - What is an HTTP client class in android?

A - httprequest(get/post) and returns response from the server

B - Cookies management

C - Authentication management

D - None of the above

60 - What is the JSON exception in android?

A - JSon Exception

B - Json Not found exception

C - Input not found exception

D - None of the above

Answer : A

61 - Is it possible activity without UI in android?

A - No, it's not possible

B - Yes,it's possible

C - We can't say

D - None of the above

Answer : B

62 - What is an interface in android?

A - Interface acts as a bridge between class and the outside world.

B - Interface is a class.

C - Interface is a layout file.

D - None of the above

Answer : A

63 - Can a user save all database updates in onStop ()?

A - Yes, a user can save all database updates in onStop()

B - No, a user can save in onSavedInstance()

C - No, a user can save in a Bundle()

D - No, In some situations, a user can't reach onStop()

Answer : D

64 - What is the life cycle of services in android?

A - onCreate()−>onStartCommand()−>onDestory()

B - onRecieve()

C - final()

D - Service life cycle is same as activity life cycle.

Answer : A

65 -What is ANR in android?

A - When the application is not responding ANR will occur.

B - Dialog box is called as ANR.

C - When Android forcefully kills an application, it is called ANR

D - None of the above

Answer : A

66- What is the use of content provider in android?

A - To send the data from an application to another application

B - To store the data in a database

C - To share the data between applications

D - None of the above.

Answer : C

67 -What is JNI in android?

A - Java network interface

B - Java interface

C - Image editable tool

D - Java native interface.

Answer : D

68 - What is breakpoint in android?

A - Breaks the application

B - Breaks the development code

C - Breaks the execution.

D - None of the above.

Answer : C

69 - What is an HTTP client class in android?

A - httprequest(get/post) and returns response from the server

B - Cookies management

C - Authentication management

D - None of the above

Answer : A

70 - How many orientations does android support?

A - 4

B - 10

C - 2

D - None of the above

Answer : A

71 - What are commands needed to create APK in android?

A - No need to write any commands

B - Create apk_android in command line

C - Javac,dxtool, aapt tool, jarsigner tool, and zipalign

D - None of the above

Answer : C

72 - How do you join two notifications in android?

A - Give same id for both notifications

B - Write notification code two times

C - It is not possible in android

C - A & B

D - A & C

Answer : E

73 - What is Android?

A - Android is a stack of software's for mobility

B - Google mobile device name

C - Virtual machine

D - None of the above

Answer : A

74 - WHich of the following is/are are the subclasses in Android?

A - Action Bar Activity

B - Launcher Activity

C - Preference Activity

D - Tab Activity

E - All of above

Answer : E

75 -What are the functionalities of Binder services in android?

A - Binder is responsible to manage the thread while using aidl in android

B - Binder is responsible for marshalling and un-marshalling of the data

C - A & B

D - Binder is a kind of interface

E - None of the above

Answer : C

76 - What is sleep mode in android?

A - Only Radio interface layer and alarm are in active mode

B - Switched off

C - Air plane mode

D - None of the Above

Answer : A

77 - What is singleton class in android?

A - A class that can create only one object

B - Anonymous class

C - Java class

D - Manifest file

Answer : A

78 - What is DDMS in android?

A - Dalvik memory server

B - Device memory server

C - Dalvik monitoring services

D - Dalvik debug monitor services

Answer : D

79 - In which technique, we can refresh the dynamic content in android?

A - Java

B - Ajax

C - Android

D - None of the Above

Answer : B

80 - What is the HTTP response error code status in android?

A - status code < 100

B - status code > 100

C - status >= 400

D - None of the above

Answer : C

81 - Why don't we give MIN SDK as 1 in android?

A - Android deprecated version

B - There is no value for 1

C - Android doesn't allow min version 1

D - None of the above

Answer : A

82- What are the main components in android?

A - Activity

B - Services

C - Broadcast Receiver

D - Content provider

Answer : A,B,C and D

83 - What is Android?

A - Android is a stack of software's for mobility

B - Google mobile device name

C - Virtual machine

D - None of the above

Answer : A

84- What is the life cycle of services in android?

A - onCreate()−>onStartCommand()−>onDestory()

B - onRecieve()

C - final()

D - Service life cycle is same as activity life cycle.

Answer : A

85-How to stop the services in android?

A - finish()

B - system.exit().

C - By manually

D - stopSelf() and stopService()

Answer : D

86 - What is the life cycle of broadcast receivers in android?

A - send intent()

B - onRecieve()

C - implicitBroadcast()

D - sendBroadcast(), sendOrderBroadcast(), and sendStickyBroadcast().

Answer : B

87 - Persist data can be stored in Android through

A - Shared Preferences

B - Internal/External storage

C - SQlite

D - Network servers.

E - All of above

Answer : E

88 -What is LastKnownLocation in android?

A - To find the last location of a phone

B - To find known location of a phone

C - To find the last known location of a phone.

D - None of the above

Answer : C

89 - What does httpclient.execute() returns in android?

A - Http entity

B - Http response

C - Http result

D - None of the above.

Answer : B

90 - What is a GCM in android?

A - Goggle Could Messaging for chrome

B - Goggle Count Messaging

C - Goggle Message pack

D - None of the above

Answer : A

91 - How many levels of securities are there in android?

A - App level security and kernel level security

B - Android level security

C - Java level security

D - None of the above

Answer : A

92 - Can a class be immutable in android?

A - No, it can't

B - Yes, Class can be immutable

C - Can't make the class as final class

D - None of the above

Answer : B

93 - How to kill an activity in Android?

A - finish()

B - finishActivity(int requestCode)

C - A & B

D - kill()

E - None of the Above

Answer : C

94-How to move services to foreground in android?

A - Services always work in Foreground only

B - No,We can't do this query

C - Using startService(Intent intent)

D - startFordgroud(int id, Notification notification).

Answer : D

We have to call startFordgroud(int id,Notification notification) to make services as foreground services. When it comes to foreground, it will show a notification.

95 -What are the return values of onStartCommand() in android services?

A - START_STICKY

B - START_NOT_STICKY

C - START_REDELIVER_INTENT

D - All of the above

E - None of the above

Answer : D

96 - What is the difference between content values and cursor in android SQlite?

A - Content values are key pair values, which are updated or inserted in the database

B - Cursor is used to store the temporary result.

C - A & B

D - Cursor is used to store data permanently.

E - Content values are used to share the data.

Answer : C

97 -What is JNI in android?

A - Java network interface

B - Java interface

C - Image editable tool

D - Java native interface.

Answer : D


98- What are the debugging techniques available in android?

A - DDMS

B - Breaking point

C - Memory profiling

D - None of the above.

E - None of the above.

Answer : D

99 - What does httpclient.execute() returns in android?

A - Http entity

B - Http response

C - Http result

D - None of the above.

Answer : B

Httpclient.execute() executes only once and it will return http response from the server or device, Http entity is embedded the body of the Http response.

100 - What is fragment in android?

A - JSON

B - Peace of Activity

C - Layout

D - None of the above

Answer : B