• 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 : A

Explanation

Android is a stack of software applications for mobile devices, which includes an operating system, middleware applications, and some key applications. It executes within own process and own instance of Dalvik Virtual Machine. DVM executes byte code and later transforms into .dex format files.

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.

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

Explanation

START_STICKY − If android stops services forcefully, using with START_STICKY, it can be restarted automatically without the user interaction.

START_NOT_STICKY − If android stops services forcefully, it will not restart services till user start services.

START_REDELIVER_INTENT − If android stops services forcefully, it will restart services by re-sending an intent.

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

A - Two

B - One

C - Many

D - Zero

Answer : C

Explanation

The task is a collaboration of applications. It contains one or more applications in it

Answer : A

Explanation

There is only an object which can be accessed by all other class.

Answer : C

To find the last known location of a phone we need to use LastKnownLocation, the syntax is as shown below.

Location location = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);

Answer : B

Using with log cat, we can find the exception, which has occurred along with the line number. Using of line number, we can find the errors.

Answer : D

Json elements are Number, string, boolean, null, array, and object

Answer : C

Using with Javac, we can compile Java files

Use dx tool to convert all Java class files to single dex file

Use AAPT tool to create apk file

Sign the apk file by using jar signer

Zipalign of signed apk

Answer : D

The concurrent executable unit is called a thread. It's performs some background functionalities with services.

android_questions_answers.htm
Advertisements