NEW
Font size
WorksheetsAndroid Final DTU
Total questions: 71
Worksheet time: 36mins
What is an activity in Android
Activity performs the actions on the screen
Manage the Application content
Screen UI
None of the mention
What is Manifest.xml in android
It has information about layout in an application
It has the information about activities in an application
It has all the information about an application
None of the above
What is the use of content provider in android
To send the data from an application to another application
To store the data in a database
To share the data between application
None of the above
What is the anonymous class in Android
Interface class
A class that does not have a name but have functionalities in it
Java class
Manifest file
Is it possible activity without UI in android?
No, it's not possible
Yes, it's possible
We can't say
None of the above
What is life cycle of foreground activity in Android
onCreate() -> onStart() -> onResume() -> onStop() -> onRestart()
onCreate() -> onStart() -> onResume() -> onStop()
onCreate() -> onStart() -> onResume()
None of the above
SharePreferences stores the data in which format
TXT
XML
DOC
None of the above
The first step when working with SQLite is to create a class that inherits from a helper class, what is it?
SQLiteOpenHelper class
SQLiteHelper class
SQLiteDatabaseHelper class
SQLiteDatabase class
Name the method that enable you to obtain the path of the external storage of an Android device
getExternalStorageDirectory()
getPathExternalStorageDirectory()
getExternalStorageFile()
getExternalStoragePath()
In Android, by default, SQLite database save data in?
Memory
External Storage
Internal Storage
On the cloud
Which database is natively supported by android
MSSQL
MySQL
SQLite
Oracle
On Android SQLite, where can we define table, columns, views and triggers?
onUpgrade()
onInit()
onStart()
onCreate()
How do we get access to the preference
Via getPreference() method
Via getSharedPreference() method
Via getDefaultSharedPreference() method
All of above
There are 5 different methods to store persistent data: Share Preference, Internal Storage, External Storage, Network and ..... ?
Core Data
SQLite Database
Web Service
All of the above
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 False, B False
A True, B True
A True, B False
A False, B True
What does the .apk extension stand for?
application package
application program kit
android properatry kit
android package
Which of these are not one of the three main components of the APK?
dalvik executable
resources
native libraries
webkit
What is the name of the program that converts Java byte core into Dalvik byte code?
android interpretive compiler (aic)
dalvik converter
dex compiler
mobile interpretive compiler (mic)
What was the main reason for replacing the Java VM with the Dalvik VM when the project began?
There was not enough memory capability
Java virtual machine was not free
java vm was to complicated to configure
Java VM ran too slow
Android Application must be signed
after they are installed
before they are installed
never
within 2 weeks of installion
Which of the following are not a component of the APK file?
dalvik executable
resources
native libraries
All of these are components of the apk
The R.java file is where you edit the resources for your project
True
False
What is contained within the manifest.xml file
the permission the app requires
the list of strings used in the app
the source code
all other choices
What is contained within the Layout xml file?
Orientation and layouts that specify what the display looks like
the permissions required by the app
The strings used in the app
The code which is compiled to run the app
The emulated device for Android
runs the same code base as the actual device, all the way down to the machine layer
Is more of a simulator, and acts as a virtual machine for the android device
runs the same code base as the actual device, however at a higher level
an imaginary machine build on the hopes and dreams of baby elephants
The Java source code is what is directly run on the Android device
True
False
The R file is a (an) generated file
automatically
manually
emulated
None of the above
An activity can thought as corresponding to what?
Java project
Java class
Method call
Object field
To create an emulator, you need an AVD. What does it stand for?
Android Virtual Display
Android Virutal Device
Active Virtual Device
Application Virtual Device
The Android SDK ships with an emulator
True
False
The _____ file specifies the layout of your screen
layout
manifest
string xml
r
What is the driving force behind an Android application and that ultimately gets converted into a Dalvik executable?
Java source code
R file
The emulator
The SDK
While developing Android applications, developers can test their apps on?
Emulator included in android sdk
Physical android phone
Third-party emulators
All three options
What file is responsible for glueing everthing together, explaining what the application consists of, what its main building blocks are, etc ...?
Layout file
String xml
R file
Manifest file
The XML file that contains all the text that your application uses
stack.xml
test.xml
string.xml
string.java
Which of the following is the most "resource hungry" part of deadling with Activites on Android
closing an app
suspending an app
opening a new app
restoring the most recent app
What runs in the background and doesn't have any UI components
intents
content providers
services
applications
What is an Activity
A single screen the user sees on the device at one time
A message send among the major building blocks
A component that runs in the background without any interface
context referring to the application environment
When an activity doesn't exist in memory, it is in ....
starting stare
running state
loading state
inexistent state
Which of the following is NOT a state in the lifecycle of a service?
starting
running
destroyed
paused
Intents
are messages that are sent among major building blocks
trigger activities to being, services to start or stop, or broadcast
are asynchronous
All of these
When an activity is not in focus, but still visible on the screen, it is in?
running state
paused state
stopped state
destroyed state
Broadcast receivers are Android's implementations of a system-wide publish/subscribe mechanism, or more precisely, what design pattern?
observer
facaded
mediator
command
What built-in database is Android shipped with?
SQLite
apache
MySQL
Oracle
Create an UI (User Interface) in Android requires careful use of?
Java and SQL
XML and Java
XML and C++
Dreamweaver
Status data will be exposed to be the rest of the Android system via:
Intents
Content provider
network receivers
altering permissions
When ContentProvider would be actived?
Using intent
Using SQLite
Using ContentResolver
None of the above
Which class provides a general framework that allows you to save and retrieve persistent key-value pairs of primitive data types?
File
SharePreference
SQLiteOpenHelper
BufferedWriter
Which Android File API to create a file?
openInputFile()
openFileOutPut()
getFile()
Which statements are correct about Broadcast receivers?
Broadcast receivers are Android's implementation of Publish/Subcribe messaging pattern.
Applications (known as publishers) can generate broadcast to simply send events not knowing who, if anyone, will get them
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
All of the above
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?
myIntent is class Intent
myIntent is implicit Intent
myIntent is a system Intent
myIntent is explicit Intent
What is TRUE about sessionStorage
It is available in only one session
It is slower than localStorage
It is never expired
Four main components of an Android application are: Activites, Services, Broadcast Receivers and ......
Content Providers
Fragment Intents
Intents
SQLite Database
Intent myintent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(myIntent);
Which of following is true?
myIntent is class Intent
myIntent is implicit Intent
myIntent is system Intent
myIntent is explicit Intent
Which of the following used to detect when a user clicks or taps on a button
OnClickListener
OnClickButton
OnClickDetector
OnPressListener
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 False B False
A True B False
A True B True
A False B True
How to display a Toast
show() method
getText() method
display() method
None of the above
Android is based on which language?
JavaScript
Java
C#
C++
What will happen if you have 2 or more activites with the same intent filter action name?
The Android OS will choose second activity
The Android OS will display a dialog from which users can choose which activity they want to use
The Android OS will choose first activity
The Android OS will display an error
How to calling Sub-Activities for result data?
Use the startActivityForResult() method to start Activity, called a Sub-Activity
In the Sub-Activity class, call setResult(), finish() methods to return the result to the Parent Activity
In the parent activity, the returned data is done by protected void onActivityResult
None of the above
How does Android system manage activity;s life cycle?
Manually by the user
Via system GC
Via System activity stack
None of the above
Which of the following is approriate for saving the data of an Android application
Activity.onDestroy()
Activity.onStop()
Activity.onPause()
Activity.onFreeze()
What are the Direct subclasses of Activity?
ListActivity
ActivityGrou[
FragmentActivity
All of the above
What is Android view group?
Layouts
Base class of building blocks
FragmentActivity
Collection of views and other child views
What is value on components's attribute "layout_width" and "layout_height" to display the component big enough to enclose its content only?
wrap_content
fill_parent
match_parent
None of the above
What is Toast class?
The Toast class is used to display notifications on the device's status bar
The Toast class is used to display notifications on the device's status bar and disappears after a few seconds
The Toast class is used to display alerts to the user and disappears when user click on OK button
The Toast class is used to display alerts to the user and disappears after a few seconds
What is not true about the Android application lifecycle?
Each application runs in its own process
Processes are started and stopped as needed to run apps components.
Processes may be killed to reclaim needed resources
Each activity of an application runs in its own process
Name of the permissions you need to declare in your AndroidManifest.xml for sending and receiving SMS message?
The two permissions are SEND_PERMISSION and RECEIVE_PERMISSION
The two permissions are SEND_MESSAGE and RECEIVE_MESSAGE
The two permissions are SEND_SMS and RECEIVE_SMS
The two permissions are SEND and RECEIVE
Before the diaglog is displayed, which callback methods will Android call?
onInitDiaglog(int)
onPrepareDialog(int, Dialog)
onShowDialog(int)
onCreateDiaglog(int)
How many threads are there in AsyncTask in Android
Only One
Three
AsyncTask doesn't have thread
Two
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"
Activities
Services
Content Providers
Broadcast Receivers
