Android Online Quiz


Advertisements


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

Q 1 - Is it possible to have an activity without UI to perform action/actions?

A - Not possible

B - Wrong question

C - Yes, it is possible

D - None of the above

Answer : C

Explanation

Generally, every activity is having its UI(Layout). But if a developer wants to create an activity without UI, he can do it.

Answer : C

Explanation

Manifest.xml is having information about application as number components in your application,Activity information,service information, and icon about an application

Each application has at least one Manifest file. Without manifest file we can't generate the APK file.

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.

Answer : D

Explanation

The getContext() method is used in onCreate() method and getApplicationContext() can be used anywhere in an application.

Answer : B

Explanation

Anonymous class doesn't have class name but has some functionalities in it.

Answer : C

APK is an android packaging kit. We can pack/zip, our code in apk format to work on Android devices as an application.

Answer : D

HTTP Client has the capabilities to manage connections, cookies and Authentication.

Answer : D

Using FragmentManager.findFragmentByID(R.id.fragment), we can find the fragment/fragments which are placed on the layout

Answer : A

Android is having two levels of securities, they are as App level security and kernel level security

Answer : A

The Interface acts as a bridge between class and the outside world. Interface contains method declaration, nested types, and constants.


android_questions_answers.htm

Advertisements
E-Books Store