wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Android Final DTU

Total questions: 71

Worksheet time: 36mins

Name
Class
Date
1.

What is an activity in Android

a)

Activity performs the actions on the screen

b)

Manage the Application content

c)

Screen UI

d)

None of the mention

2.

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

3.

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 application

d)

None of the above

4.

What is the 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

5.

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

6.

What is life cycle of foreground activity in Android

a)

onCreate() -> onStart() -> onResume() -> onStop() -> onRestart()

b)

onCreate() -> onStart() -> onResume() -> onStop()

c)

onCreate() -> onStart() -> onResume()

d)

None of the above

7.

SharePreferences stores the data in which format

a)

TXT

b)

XML

c)

DOC

d)

None of the above

8.

The first step when working with SQLite is to create a class that inherits from a helper class, what is it?

a)

SQLiteOpenHelper class

b)

SQLiteHelper class

c)

SQLiteDatabaseHelper class

d)

SQLiteDatabase class

9.

Name the method that enable you to obtain the path of the external storage of an Android device

a)

getExternalStorageDirectory()

b)

getPathExternalStorageDirectory()

c)

getExternalStorageFile()

d)

getExternalStoragePath()

10.

In Android, by default, SQLite database save data in?

a)

Memory

b)

External Storage

c)

Internal Storage

d)

On the cloud

11.

Which database is natively supported by android

a)

MSSQL

b)

MySQL

c)

SQLite

d)

Oracle

12.

On Android SQLite, where can we define table, columns, views and triggers?

a)

onUpgrade()

b)

onInit()

c)

onStart()

d)

onCreate()

13.

How do we get access to the preference

a)

Via getPreference() method

b)

Via getSharedPreference() method

c)

Via getDefaultSharedPreference() method

d)

All of above

14.

There are 5 different methods to store persistent data: Share Preference, Internal Storage, External Storage, Network and ..... ?

a)

Core Data

b)

SQLite Database

c)

Web Service

d)

All of the above

15.

There are 2 statements, which of them are correct ?

+ Statement A: Using Shared Preferences, you can store private primitive data only.

Statement B: Using External Storage option, you can store public data on the shared external storage.

a)

A False, B False

b)

A True, B True

c)

A True, B False

d)

A False, B True

16.

What does the .apk extension stand for?

a)

application package

b)

application program kit

c)

android properatry kit

d)

android package

17.

Which of these are not one of the three main components of the APK?

a)

dalvik executable

b)

resources

c)

native libraries

d)

webkit

18.

What is the name of the program that converts Java byte core into Dalvik byte code?

a)

android interpretive compiler (aic)

b)

dalvik converter

c)

dex compiler

d)

mobile interpretive compiler (mic)

19.

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 to complicated to configure

d)

Java VM ran too slow

20.

Android Application must be signed

a)

after they are installed

b)

before they are installed

c)

never

d)

within 2 weeks of installion

21.

Which of the following are not a component of the APK file?

a)

dalvik executable

b)

resources

c)

native libraries

d)

All of these are components of the apk

22.

The R.java file is where you edit the resources for your project

a)

True

b)

False

23.

What is contained within the manifest.xml file

a)

the permission the app requires

b)

the list of strings used in the app

c)

the source code

d)

all other choices

24.

What is contained within the Layout xml file?

a)

Orientation and layouts that specify what the display looks like

b)

the permissions required by the app

c)

The strings used in the app

d)

The code which is compiled to run the app

25.

The emulated device for Android

a)

runs the same code base as the actual device, all the way down to the machine layer

b)

Is more of a simulator, and acts as a virtual machine for the android device

c)

runs the same code base as the actual device, however at a higher level

d)

an imaginary machine build on the hopes and dreams of baby elephants

26.

The Java source code is what is directly run on the Android device

a)

True

b)

False

27.

The R file is a (an) generated file

a)

automatically

b)

manually

c)

emulated

d)

None of the above

28.

An activity can thought as corresponding to what?

a)

Java project

b)

Java class

c)

Method call

d)

Object field

29.

To create an emulator, you need an AVD. What does it stand for?

a)

Android Virtual Display

b)

Android Virutal Device

c)

Active Virtual Device

d)

Application Virtual Device

30.

The Android SDK ships with an emulator

a)

True

b)

False

31.

The _____ file specifies the layout of your screen

a)

layout

b)

manifest

c)

string xml

d)

r

32.

What is the driving force behind an Android application and that ultimately gets converted into a Dalvik executable?

a)

Java source code

b)

R file

c)

The emulator

d)

The SDK

33.

While developing Android applications, developers can test their apps on?

a)

Emulator included in android sdk

b)

Physical android phone

c)

Third-party emulators

d)

All three options

34.

What file is responsible for glueing everthing together, explaining what the application consists of, what its main building blocks are, etc ...?

a)

Layout file

b)

String xml

c)

R file

d)

Manifest file

35.

The XML file that contains all the text that your application uses

a)

stack.xml

b)

test.xml

c)

string.xml

d)

string.java

36.

Which of the following is the most "resource hungry" part of deadling with Activites on Android

a)

closing an app

b)

suspending an app

c)

opening a new app

d)

restoring the most recent app

37.

What runs in the background and doesn't have any UI components

a)

intents

b)

content providers

c)

services

d)

applications

38.

What is an Activity

a)

A single screen the user sees on the device at one time

b)

A message send among the major building blocks

c)

A component that runs in the background without any interface

d)

context referring to the application environment

39.

When an activity doesn't exist in memory, it is in ....

a)

starting stare

b)

running state

c)

loading state

d)

inexistent state

40.

Which of the following is NOT a state in the lifecycle of a service?

a)

starting

b)

running

c)

destroyed

d)

paused

41.

Intents

a)

are messages that are sent among major building blocks

b)

trigger activities to being, services to start or stop, or broadcast

c)

are asynchronous

d)

All of these

42.

When an activity is not in focus, but still visible on the screen, it is in?

a)

running state

b)

paused state

c)

stopped state

d)

destroyed state

43.

Broadcast receivers are Android's implementations of a system-wide publish/subscribe mechanism, or more precisely, what design pattern?

a)

observer

b)

facaded

c)

mediator

d)

command

44.

What built-in database is Android shipped with?

a)

SQLite

b)

apache

c)

MySQL

d)

Oracle

45.

Create an UI (User Interface) in Android requires careful use of?

a)

Java and SQL

b)

XML and Java

c)

XML and C++

d)

Dreamweaver

46.

Status data will be exposed to be the rest of the Android system via:

a)

Intents

b)

Content provider

c)

network receivers

d)

altering permissions

47.

When ContentProvider would be actived?

a)

Using intent

b)

Using SQLite

c)

Using ContentResolver

d)

None of the above

48.

Which class provides a general framework that allows you to save and retrieve persistent key-value pairs of primitive data types?

a)

File

b)

SharePreference

c)

SQLiteOpenHelper

d)

BufferedWriter

49.

Which Android File API to create a file?

a)

openInputFile()

b)

openFileOutPut()

c)

getFile()

50.

Which statements are correct about Broadcast receivers?

a)

Broadcast receivers are Android's implementation of Publish/Subcribe messaging pattern.

b)

Applications (known as publishers) can generate broadcast to simply send events not knowing who, if anyone, will get them

c)

Receivers (known as subcribers) that want the information subcribe to specific messages via filter. If the message match a filter, the subcriber is actived(if it's not already running) and notified of the message

d)

All of the above

51.

Intent myintent = new Intent(this, ActivityTwo.class);

mylntent.putExtra("Value","This value one for Activity Two ");

myintent.putExtra("Value2", "This value two Activity Two");

Which of following is true?

a)

myIntent is class Intent

b)

myIntent is implicit Intent

c)

myIntent is a system Intent

d)

myIntent is explicit Intent

52.

What is TRUE about sessionStorage

a)

It is available in only one session

b)

It is slower than localStorage

c)

It is never expired

53.

Four main components of an Android application are: Activites, Services, Broadcast Receivers and ......

a)

Content Providers

b)

Fragment Intents

c)

Intents

d)

SQLite Database

54.

Intent myintent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));

startActivity(myIntent);

Which of following is true?

a)

myIntent is class Intent

b)

myIntent is implicit Intent

c)

myIntent is system Intent

d)

myIntent is explicit Intent

55.

Which of the following used to detect when a user clicks or taps on a button

a)

OnClickListener

b)

OnClickButton

c)

OnClickDetector

d)

OnPressListener

56.

There are two statements: Statement A: Using Shared Preferences, you can store private primitive data only. Statement B: Using External Storage option, you can store public data on the shared external storage. Which of them are correct?

a)

A False B False

b)

A True B False

c)

A True B True

d)

A False B True

57.

How to display a Toast

a)

show() method

b)

getText() method

c)

display() method

d)

None of the above

58.

Android is based on which language?

a)

JavaScript

b)

Java

c)

C#

d)

C++

59.

What will happen if you have 2 or more activites with the same intent filter action name?

a)

The Android OS will choose second activity

b)

The Android OS will display a dialog from which users can choose which activity they want to use

c)

The Android OS will choose first activity

d)

The Android OS will display an error

60.

How to calling Sub-Activities for result data?

a)

Use the startActivityForResult() method to start Activity, called a Sub-Activity

b)

In the Sub-Activity class, call setResult(), finish() methods to return the result to the Parent Activity

c)

In the parent activity, the returned data is done by protected void onActivityResult

d)

None of the above

61.

How does Android system manage activity;s life cycle?

a)

Manually by the user

b)

Via system GC

c)

Via System activity stack

d)

None of the above

62.

Which of the following is approriate for saving the data of an Android application

a)

Activity.onDestroy()

b)

Activity.onStop()

c)

Activity.onPause()

d)

Activity.onFreeze()

63.

What are the Direct subclasses of Activity?

a)

ListActivity

b)

ActivityGrou[

c)

FragmentActivity

d)

All of the above

64.

What is Android view group?

a)

Layouts

b)

Base class of building blocks

c)

FragmentActivity

d)

Collection of views and other child views

65.

What is value on components's attribute "layout_width" and "layout_height" to display the component big enough to enclose its content only?

a)

wrap_content

b)

fill_parent

c)

match_parent

d)

None of the above

66.

What is Toast class?

a)

The Toast class is used to display notifications on the device's status bar

b)

The Toast class is used to display notifications on the device's status bar and disappears after a few seconds

c)

The Toast class is used to display alerts to the user and disappears when user click on OK button

d)

The Toast class is used to display alerts to the user and disappears after a few seconds

67.

What is not true about the Android application lifecycle?

a)

Each application runs in its own process

b)

Processes are started and stopped as needed to run apps components.

c)

Processes may be killed to reclaim needed resources

d)

Each activity of an application runs in its own process

68.

Name of the permissions you need to declare in your AndroidManifest.xml for sending and receiving SMS message?

a)

The two permissions are SEND_PERMISSION and RECEIVE_PERMISSION

b)

The two permissions are SEND_MESSAGE and RECEIVE_MESSAGE

c)

The two permissions are SEND_SMS and RECEIVE_SMS

d)

The two permissions are SEND and RECEIVE

69.

Before the diaglog is displayed, which callback methods will Android call?

a)

onInitDiaglog(int)

b)

onPrepareDialog(int, Dialog)

c)

onShowDialog(int)

d)

onCreateDiaglog(int)

70.

How many threads are there in AsyncTask in Android

a)

Only One

b)

Three

c)

AsyncTask doesn't have thread

d)

Two

71.

Which one of four main components of an Android application that is corresponding with the following description: " They handle background processing associated with an application"

a)

Activities

b)

Services

c)

Content Providers

d)

Broadcast Receivers