• Android Video Tutorials

Android Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to Android. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Answer : D

Explanation

Context is used to create new components or objects like views and it is used to start activity and services. Android has two kinds of contexts and those are getContext() and getApplicationContext().

Answer : C

Explanation

Margin specifies the space left on four sides in the layout and padding specifies the exact position where the element going to be taking place in the layout.

Answer : A

Explanation

When an Application is not responding ANR will be occur, and it will stop the process or an application

Q 4 - How to store heavy structured data in android?

A - Shared Preferences

B - Cursor

C - SQlite database

D - Not possible

Answer : C

Explanation

We can store structured data in SQlite database only. SQlite database is very efficient and faster to read and store the data.

Answer : D

Explanation

Java Native interfaces are used to call native/cross applications, which are written in C and C++ languages.

Answer : A

The log message is used to debug a program. Some of log messages are shown below

log.d-Debugging log
log.i Informative log
log.e-Error log 
log.w-Warning log
log.v-verbose log

Q 7 - 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

Using with XML resource parser, we can read local resource XML in android.

Answer : C

Fragment life cycle is as shown below −

onAttach()
OnCreate()
onCreateView()
onActivityCreated()
onStart()
onResume()
onPause()
onStop()
onDestroyView()
onDestroy()
onDetach()

Answer : A

Android version 2.2 is deprecated so we don't need to call MIN version to be 1

Answer : E

Give same id for both notifications.

nm.notify(1,notification);
android_questions_answers.htm
Advertisements