Académique Documents
Professionnel Documents
Culture Documents
middleware, and key mobile applications, along with a set of API libraries for writing
applications that can shape the look, feel and functions of the devices which they run.
Android is an ecosystem made up of a combination of three components:
Devices, particularly mobile phones, that run the Android operating system and
the applications created for it
A Linux operating system kernel that provides a low-level interface with the
hardware, memory management, and process control, all optimized for mobile
and embedded devices.
A run time used to execute and host Android applications, including the Dalvik
Virtual Machine (VM) and the core libraries that provide Android-specific
functionality. The run time is designed to be small and efficient for use on mobile
devices.
1|Page
An e-mail client
A calculator
A home screen
An alarm clock
In many cases Android devices also ship with the following proprietary Google
mobile applications:
2|Page
to layout and display information, and to respond to user actions. Compared to desktop
development, Activities are equivalent to Forms. You'll learn more about Activities later
in this chapter.
ServicesThe invisible workers of your application. Service components run without a
UI, updating your data sources and Activities, triggering Notifications, and
broadcasting Intents. They're used to perform long running tasks, or those that require
no user interaction (such as network lookups or tasks that need to continue even when
your application's Activities aren't active or visible.) You'll learn more about how to
create and use services in Chapter 9, Working in the Background.
Content ProvidersShareable persistent data storage. Content Providers manage
and persist application data and typically interact with SQL databases. They're also the
preferred means to share data across application boundaries. You can configure your
application's Content Providers to allow access from other applications, and you can
access the Content Providers exposed by others. Android devices include several native
Content Providers that expose useful databases such as the media store and contacts.
You'll learn how to create and use Content Providers in Chapter 8, Databases and
Content Providers.
IntentsA powerful inter application message passing framework. Intents are used
extensively throughout Android. You can use Intents to start and stop Activities and
Services, to broadcast messages system-wide or to an explicit Activity, Service, or
Broadcast Receiver, or to request an action be performed on a particular piece of data.
Explicit,
implicit,
and
broadcast
Intents
are
explored
in
more
detail in Chapter 5, Intents and Broadcast Receivers.
Broadcast ReceiversIntent listeners. Broadcast Receivers enable your application
to listen for Intents that match the criteria you specify. Broadcast Receivers start your
application to react to any received Intent, making them perfect for creating event
driven applications. Broadcast Receivers are covered with Intents in Chapter 5.
WidgetsVisual application components that are typically added to the device home
screen. A special variation of a Broadcast Receiver, widgets enable you to create
dynamic, interactive application components for users to embed on their home screens.
You'll learn how to create your own widgets in Chapter 1 4, Invading the Home
Screen.
NotificationsNotifications enable you to alert users to application events without
stealing focus or interrupting their current Activity. They're the preferred technique for
getting a user's attention when your application is not visible or active, particularly from
within a Service or Broadcast Receiver. For example, when a device receives a text
message or an email, the messaging and Gmail applications use Notifications to alert
5|Page
you by flashing lights, playing sounds, displaying icons, and scrolling a text summary.
You can trigger these notifications from your applications, as discussed in Chapter 1 0,
Expanding the User Experience. By decoupling the dependencies between application
components, you can share and use individual Content Providers, Services, and even
Activities with other applicationsboth your own and those of third parties.
1.
bmgr
a)take
backup
b)to
c)wipe
archived
d)all of the above
ans:
tool
data
of
restore
for
is
used
the
specific
to
applications
operations
application
2.
foreground
service
a)starts
when
you
call
start
foreground()
b)may
or
may
not
provide
a
notification
for
the
status
bar
c)notification can't be dismissed unless the service is either stopped or removed from
the
6|Page
foreground
d)both
&
ans:d
3. A1,A2,A3 and A4 are activities called using intents.Then A1-A4-A2--A3.A4 calls A2
with
intent flag FLAG_ACTIVITY_NO_HISTORY.When finish method is called on A3, What
will
be
the
currtent
a)A1
b)A4
c)A3
d)A2
running
ans:
activity?
running
activity?
b)A3
c)A4
d)A1
Ans:
6.
a)
b)
c)
d)
b
The
plus(+)
means
in
Identify
it
Create
new
id
XML
parser
should
Both
statement
as
android:id="@+id/my_id"?
an
id
add
to
and
exapnd
&
and
parse
a
Ans:
resource
resources
id
string
b.
b
7. When you want system to run the service indefinitely, by restarting it when get killed,
use
a)
START_NOT_STICKY
b)
START_REDELIVER_INTENT
c)
START_STICKY
d)
START_SERVICE_INDEFINITELY
Ans:
8)
a)
b)
c)
d)
Android
To
system
broadcast
broadcast
invoke
other
All
uses
applications
of
intents
system
custom
from
the
your
Ans:
9)
a)
b)
c)
d)
8|Page
to
intents
intents
application.
above.
d
'Screen
has
turned
Normal
Ordered
background
off'
is
an
example
broadcast
broadcast
operation
None
Ans:
10) If you try to acces the column which does not exit, system throws
a)
NullPointerException
b)
illegalArgumentException
c)
ArrayIndexOutOfBoundsException
d)
SQLException
Ans:
11)
b
Maximum
results
returned
by
getFromLocationName()
method
can
be
a)
b)
c)
d)
2
3
4
5
Ans:
2.0
3.0
1.5
2.2
Ans:
13. Should always first check availability of audio effects by calling the following method
on
the
a)
b)
c)
9|Page
corresponding
audio
isvaluable
effect
class.
ischeckable()
isavailable()
()
d)
iscaview()
Ans:
14. Applications that require filtering based on screen size can use the attributes.
a)
b)
c)
d)
<supportmultiple-screens>
<supports-screens>
<supportall-screens
supportevery-screen
Ans:
15.
a)
b)
c)
d)
what
is
false
with
respect
to
onBind()
is
Ans: b
Objective
type
Question
and
Answers
class
of
Activity?
Ans)
3)What
are
the
a)AccountAuthenticatorActivity
b)
c)
d)
e)
f)
all
Ans)
4)What
are
the
a)LauncherActivity
b)PreferenceActivity
c)
d)All
Ans)
5)Parent
a)Object
b)Context
c)
d)ContextThemeWrapper
Ans)
Direct
indirect
subclasses
the
Direct
of
Activity?
ActivityGroup
ExpandableListActivity
FragmentActivity
ListActivity
aove
f
subclasses
the
class
of
of
Activity?
TabActivity
above
d
Service?
ContextWrapper
c
6)What
are
the
indirect
Direct
subclasses
of
Services?
a)
RecognitionService
b)
RemoteViewsService
c)SpellCheckerService
d)InputMethodService
Ans)
d
7)Which
component
is
not
activated
by
an
Intent?
a)Activity
b)Services
c)ContentProvider
d)BroadcastReceiver
Ans)
c
8)When
contentProvider
would
be
activated?
a)Using
Intent
b)Using
SQLite
c)Using
ContentResolver
11 | P a g e
d)None
of
the
above
Ans)
c
9)Which of the important device characteristics that you should consider as you design
and
develop
your
application?
a)Screen
size
and
density
b)Input
configurations
c)Device
features
d)Platform
Version
e)All
of
the
above
Ans)
e
10)Which
are
the
screen
sizes
in
Android?
a)small
b)normal
c)large
d)extra
large
e)All
of
the
above
Ans)
e
11)Which
are
the
screen
densities
in
Android?
a)low
density
b)medium
density
c)high
density
d)extra
high
density
e)All
of
the
above
Ans)
e
12)You can shut down an activity by calling its _______ method
a)onDestory()
b)finishActivity()
c)finish()
d)None
of
the
above
Ans)
c
13)What is the difference between Activity context and Application Context?
a) The Activity instance is tied to the lifecycle of an Activity.
while the application instance is tied to the lifecycle of the application,
b) The Activity instance is tied to the lifecycle of the application,
while the application instance is tied to the lifecycle of an Activity.
c) The Activity instance is tied to the lifecycle of the Activity,
while the application instance is tied to the lifecycle of an application.
d)
None
of
the
above
Ans)
a
14)Which
one
is
NOT
related
to
fragment
class?
12 | P a g e
a)DialogFragment
b)ListFragment
c)PreferenceFragment
d)CursorFragment
Ansa)d
15)Definition
of
Loader?
a) loaders make it easy to asynchronously load data in an activity or fragment.
b) loaders make it easy to synchronously load data in an activity or fragment.
c) loaders does not make it easy to asynchronously load data in an activity or fragment.
d)
None
of
the
above.
Ans)
a
16)Characteristics
of
the
Loaders?
a)They
are
available
to
every
Activity
and
Fragment.
b)They
provide
asynchronous
loading
of
data.
c)They monitor the source of their data and deliver new results when the content
changes.
d)They automatically reconnect to the last loader's cursor when being recreated after a
configuration change. Thus, they don't need to re-query their data.
e)All
of
the
above.
Ans)
e
17)How
many
ways
to
start
services?
a)Started
b)Bound
c)a
&
b
d)None
of
the
above.
Ans)
c
18)If your service is private to your own application and runs in the same process as the
client (which is common), you should create your interface by extending the
________class?
a)
Messenger
b)
Binder
c)
AIDL
d)None
of
the
above
Ans)
b
19)If you need your interface to work across different processes, you can create an
interface
for
the
service
with
a
________?
a)Binder
b)Messenger
c)AIDL
13 | P a g e
d)
or
c
Ans)
d
20)AsyncTask allows you to perform asynchronous work on your user interface. It
performs the blocking operations in a worker thread and then publishes the results on
the
UI
thread.
a)true
b)false
Ans)
a
21)Layouts
in
android?
a)Frame
Layout
b)Linear
Layout
c)Relative
Layout
d)Table
Layout
e)All
of
the
above
Ans)
e
22)
Dialog
classes
in
android?
a)AlertDialog
b)ProgressDialog
c)DatePickerDialog
d)TimePickerDialog
e)All
of
the
above
Ans)
e
23)If you want share the data accross the all applications ,you should go for?
a)Shared
Preferences
b)Internal
Storage
c)SQLite
Databases
d)content
provider
Ans)
d
24)Difference
between
android
api
and
google
api?
a)The google API includes Google Maps and other Google-specific libraries. The
Android
one
only
includes
core
android
libraries.
b)The google API one only includes core android libraries. The Android includes
Google
Maps
and
other
Google-specific
libraries.
c)None
of
the
above.
Ans) a
Android: Menus and Dialogs
Table
1. Menus
14 | P a g e
of
contents:
Options menu
Context menu
Sub menu
Creating different Menus
2. Dialogs
Alert Dialog
Progressbar dialog
DatePicker dialog
TimePicker Dialog
Toast
Creating different dialogs
Menus
Menus provide familiar interfaces to expose application functions without sacrificing
screen space.
Android offers an easy programming interface to provide standardized application
menus.
Android offers three fundamental types of application menus:
Options Menu
Context Menu
Sub-menu
Options
Menu:
16 | P a g e
17 | P a g e
menu.add() adds a MenuItem and returns the newly created object to set additional
properties like icon, shortcut, ...etc.
public abstract MenuItem add(groupId, itemId, order, CharSequence)
Override onOptionsItemSelected() callback method to perform any action for a selected
Options menu item by identifying its id using item.getItemId().
public abstract int getItemId()
Override onPrepareOptionsMenu() callback method to update the menu dynamically
each time it gets displayed.
Options
/*
Creates
public
boolean
menu.add(0,
menu.add(0,
return
}
/*
Handles
18 | P a g e
Menu
Example:
the
menu
items
onCreateOptionsMenu(Menu
menu)
1,
0,
"Menu
2,
0,
"Menu
item
selections
*/
{
1");
2");
true;
*/
public
switch
case
return
case
return
}
return
}
boolean
1:
2:
onOptionsItemSelected(MenuItem
(item.getItemId())
//Action
for
//Action
for
item)
Menu
Menu
{
{
1
true;
2
true;
false;
/*
Re-write
the
Options
Menu
as
it
is
opened
*/
public
boolean
onPrepareOptionsMenu(Menu
menu)
{
//Action
to
modify
Menu
each
time
it
is
opened.
SubMenu
sm1
=
(SubMenu)menu.getItem(0);
sm1.setIcon(R.drawable.icon);
sm1.add("NM
X");
menu.getItem(4).setIcon(R.drawable.icon);
return
super.onPrepareOptionsMenu(menu);
}
Sub
Menu:
Sub menu is a floating menu, it can be a child menu of options menu or context
menu.
It
supports
checkboxes,
radio
buttons
19 | P a g e
and
shortcut
keys.
Context Menu
Context menu is a floating menu that is associated with a control.
Context menu is launched when the control has the focus and the D pad is pressed.
Context menus can be assigned to any View within an Activity.
It provides functions relating to the view, to which it is registered.
It supports submenus, checkboxes, radio buttons.
It does not support shortcuts and icons.
20 | P a g e
Create
Context
Menu:
Methods provided by Activity class to create and register an Context menu are :
public void onCreateContextMenu(ContextMenu, View, ContextMenuInfo)
public boolean onContextItemSelected(MenuItem item)
public void registerForContextMenu(view)
Override onCreateContextMenu() callback method, to add items to Context menu using
menu.add() method.
menu.add() adds a MenuItem and returns the newly created object to set properties
like checkboxes, radio buttons ...etc.
Override onContextItemSelected() callback method to perform any action for a selected
item by its id using item.getItemId().
Call registerForContextMenu(view) method inside onCreate() method to register the
context menu for a view.
21 | P a g e
Context
Menu
Example:
/*
Register
a
view
to
*/
public
void
onCreate(Bundle
savedInstanceState){
super.onCreate(savedInstanceState);
Button
update
=
new
Button(this);
update.setText(UPDATE);
setContentView(update);
registerForContextMenu(update);
}
/*
Create
a
Context
Menu
*/
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo
menuInfo)
{
super.onCreateContextMenu(menu,
v,
menuInfo);
menu.add(0,
1,
0,
"Edit");
menu.add(0,
2,
0,
"Delete");
}
/*
public
switch
case
return
case
return
default:
}
}
22 | P a g e
Action
boolean
1:
on
item
selection
onContextItemSelected(MenuItem
item)
(item.getItemId())
//Action
for
menu
item
2:
//Action
return
for
*/
{
{
Edit
true;
Menu
item
Delete
true;
super.onContextItemSelected(item);
Context
sub
Menu:
Menu class provides a method named addSubMenu() to add sub menus under an
Options menu or a Context menu.
public abstract SubMenu addSubMenu(group, item, order, String)
Submenu.add() method is used to add sub-menu items.
onOptionsItemSelected() callback method for a SubMenu item refers to it's parent's
callback method.
Inside onOptionsItemSelected() callback the state of the radio button/ checkbox must
be set, if the submenu item is a radio button or checkbox.
Dialog:
Date
Time
5
Alert
Progress
Picker
Picker
Dialog
Dialog
Dialog
Dialog
Toast
Alert Dialog:
A dialog that can manage zero, one, two or three buttons.
It can also manage a list of selectable items that can include checkboxes or radio
buttons.
The AlertDialog is capable of constructing most dialog user interfaces and is the
suggested dialog type.
AlertDialog class is a subclass of Dialog class and has a nested subclass
23 | P a g e
Other Dialogs:
Progress Dialog
A dialog that displays a progress wheel or progress bar.
It supports buttons like in AlertDialog.
DatePicker Dialog
A dialog that allows the user to select a date.
TimePicker Dialog
A dialog that allows the user to select a time.
Toast:
A toast is a transient Dialog box containing a quick little message for the user.
Toasts never receive focus and they dont interrupt the active application.
They provide an ideal mechanism for alerting users to events occurring in background
Services without interrupting foreground applications.
Toast class provides a static method to create a standard toast display window.
static Toast makeText(context, text, duration)
Examples : Volume control, message for change settings.
Create
Dialog:
Create
Dialog:
Override
onCreateDialog(id)
to
create
a
dialog
protected
Dialog
onCreateDialog(int
id)
{
switch(id){
case
DIALOG_ALERT_ID:
//Create
required
dialog
and
return
object
case
DIALOG_DISP:
//Create
required
dialog
and
return
object
case
DIALOG_PROGRESS:
//Create
required
dialog
and
return
object
default:
return
super.onCreateDialog(id);
}
Call
showDialog(id)
to
display
the
corresponding
dialog
showDialog(DIALOG_PROGRESS);
Override
onPrepareDialog()
to
protected
void
onPrepareDialog(int
super.onPrepareDialog(id,
25 | P a g e
modify
id,
Dialog
dialog
dialog)
{
dialog);
switch(id)
case
//Modify
case
//Modify
case
//Modify
default
break;
}
}
Create
in
dialog
in
dialog
in
dialog
Alert
{
DIALOG_ALERT_ID:
and
break;
DIALOG_DISP:
and
break;
DIALOG_PROGRESS:
and
break;
:
Dialog:
Progress
Dialog:
Create
a
progress
dialog
object
ProgressDialog
progress
=
new
ProgressDialog(mContext);
Set
all
the
required
properties
and
return
progress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progress.setTitle("Loading...");
progress.setMessage("Loading.
Please
wait...");
26 | P a g e
progress.setCancelable(false);
Create
the
object
by
its
ProgressDialog
dialog
=
"Loading.
Please
//Can
set
other
dialog.setCancelable(true);
dialog.setIcon(R.drawable.icon);
Create
Time
show()
method,
as
shown
below.
ProgressDialog.show(this,
"Loading...",
wait...",
true);
properties
here
also
Picker
Dialog:
Date
picker
dialog:
Create
Toast:
Create
a
Toast
object
with
application
context.
Toast
t
=
new
Toast(getApplicationContext());
Set
properties
like
text,
duration
and
position.
t.setDuration(Toast.LENGTH_LONG);
t.setText("Dialog
Displayed
from
Toast");
t.setGravity(Gravity.LEFT,
10,
100);
//Position,
xOffset
and
yOffset
Display
a
Toast
using
its
show()
method.
t.show();
Create
directly
using
its
static
method
makeText()
as
below.
Toast
t
=
Toast.makeText(getApplicationContext(),
"Dialog
Displayed",
Toast.LENGTH_SHOT);
1.
a)take
b)to
c)wipe
d)all
bmgr
backup
archived
tool
data
of
of
restore
for
is
used
the
specific
the
ans:
to
applications
operations
application
above
d
2.
foreground
service
a)starts
when
you
call
start
foreground()
b)may
or
may
not
provide
a
notification
for
the
status
bar
c)notification can't be dismissed unless the service is either stopped or removed from
the
foreground
d)both
&
ans:d
3. A1,A2,A3 and A4 are activities called using intents.Then A1-A4-A2--A3.A4 calls A2
28 | P a g e
with
intent flag FLAG_ACTIVITY_NO_HISTORY.When finish method is called on A3, What
will
be
the
currtent
a)A1
b)A4
c)A3
d)A2
running
ans:
activity?
running
Ans:
activity?
b
The
29 | P a g e
plus(+)
means
in
statement
android:id="@+id/my_id"?
a)
b)
c)
d)
Identify
it
Create
new
id
XML
parser
should
Both
as
an
id
add
to
and
exapnd
&
and
parse
a
Ans:
resource
resources
id
string
b.
b
7. When you want system to run the service indefinitely, by restarting it when get killed,
use
a)
START_NOT_STICKY
b)
START_REDELIVER_INTENT
c)
START_STICKY
d)
START_SERVICE_INDEFINITELY
Ans:
8)
a)
b)
c)
d)
Android
To
system
broadcast
broadcast
invoke
other
All
uses
applications
of
intents
system
custom
from
the
your
Ans:
9)
to
intents
intents
application.
above.
d
'Screen
a)
b)
c)
d)
Ans:
has
turned
Normal
Ordered
background
off'
is
an
example
broadcast
broadcast
operation
None
a
10) If you try to acces the column which does not exit, system throws
a)
NullPointerException
b)
illegalArgumentException
c)
ArrayIndexOutOfBoundsException
30 | P a g e
d)
SQLException
Ans:
11)
b
Maximum
results
returned
by
getFromLocationName()
method
can
be
a)
b)
c)
d)
2
3
4
5
Ans:
2.0
3.0
1.5
2.2
Ans:
13. Should always first check availability of audio effects by calling the following method
on
the
a)
b)
c)
d)
Ans:
corresponding
audio
isvaluable
effect
class.
ischeckable()
isavailable()
()
iscaview()
a
14. Applications that require filtering based on screen size can use the attributes.
a)
31 | P a g e
<supportmultiple-screens>
b)
c)
d)
<supports-screens>
<supportall-screens
supportevery-screen
Ans:
15.
a)
b)
c)
d)
what
is
false
with
respect
to
onBind()
is
Ans:
Gnu's
GPL
Apache/MIT
OSS
Sourceforge
B
17)Although most people's first thought when they think of Android is Google, Android
is not actually owned by Google. Who owns the Android platform? | Android
A.
B.
C.
D.
Oracle
The
above
Open
statement
is
and
Handset
Android
is
owned
Ans:
Technology
Dalvik
Alliance
by Google
C
18)As an Android programmer, what version of Android should you use as your
minimum
development
target?
|
Android
A.
B.
32 | P a g e
Versions
Versions
1.6
1.0
or
or
2.0
1.1
C.
D.
Versions
Versions
1.2
2.3
or
or
1.3
3.0
Ans:
19)What was Google's main business motivation for supporting Android? | Android
A.
To
level
the
playing
field
for
mobile
devices
B.
To
directly
compete
with
the
iPhone
C. To corner the mobile device application market for licensing purposes
D.
To
allow
them
to
advertise
more
Ans:
20)What was the first phone released that ran the Android OS? | Android
A.
B.
C.
D.
Google
T-Mobile
Motorola
HTC
gPhone
G1
Droid
Hero
Ans:
21)From a phone manufacturer's point of view, what makes Android so great? | Android
A. Aside from some specific drivers, it provides everything to make a phone work
B.
It
makes
the
hardware
work
better
C.
It
allows
them
to
compete
with
Apple's
iPhone
D. It allows users to create apps, generating revenue for the companies
Ans:
22)What
A
is
funny
fact
about
the
start
of
Android?
Android
A.
It
was
orginaly
going
to
be
called
UFO
B. The first version of Android was released without an actual phone on the market
C. Androids main purpose was to unlock your car door when you left the keys inside of
it.
D. Was going to be a closed source application to make more money for its company.
33 | P a g e
Ans:
23)What
year
was
the
Open
Handset
Alliance
announced?
A.
B.
C.
D.
Android
2005
2006
2007
2008
Ans:
24)A device with Android installed is needed to develop apps for Android.
A.
B.
True
False
Ans:
25)Android tries hard to _____low-level components, such as the software stack, with
interfaces
so
that
vendor-specific
code
can
be
managed
easily.
A.
B.
C.
D.
confound
absract
modularize
compound
Ans:
26)Google
licensed
some
proprietary
apps.
Android
A.
B.
True
False
Ans:
27)What
A.
B. all
C.
part
of
34 | P a g e
these
of
the
Android
low-level
answers #The
platform
entire
native
is
open
Linux
stack is an
source?
open
Android
source
modules
platform
libraries
D.
E.
application
complete
frame
work
applications
Ans:
28)When
did
purchase
Android?
ANdroid
A.
B.
C.
D.
2007
2005
2008
2010
Ans:
29)Android releases since 1.5 have been given nicknames derived how? | Android
A.
B.
C.
D.
Adjective
Something
that
and
starts
w/
strange
'A' ->
American
Something
that
animal
Food
w/ 'B'...
states
starts
Ans:
30)Which
A.
B.
C.
D.
Ans:
one
is
not
nickname
of
version
of
Andriod?
Android
cupcake
Gingerbread
Honeycomb
Muffin
D
31)Android doesn't make any assumptions about a device's screen size, resolution, or
chipset.:
A.
B.
Ans:
35 | P a g e
True
False
A
32)Which Android version had the greatest share of the market as of January 2011? |
Android
A.
B.
C.
D.
1.1
1.5
2.3
3.4
Ans:
Keypad
WiFi?
Audio
Power
Ans:
driver
driver
driver
management
34)Android is built upon the Java Micro Edition (J2ME) version of Java. | Android
A.
True
B.
False
Ans:
35)Which among these are NOT a part of Android's native libraries? | Android
A.
B.
C.
D.
Webkit
Dalvik
OpenGL
SQLite
Ans:
36)Android
A.
B.
36 | P a g e
is
based
on
Linux
for
the
following
reason.
Android
Security
Portability
C.
D.
Ans:
All
of
Networking
these
37)What operating system is used as the base of the Android stack? | Android
A.
B.
C.
D.
Ans:
Linux
Windows
Java
XML
A
38)What year was development on the Dalvik virtual machine started? | Android
A.
B.
C.
D.
Ans:
2003
2005
2007
2006
B
39)What is a key difference with the distribution of apps for Android based devices than
other
mobile
device
platform
applications?
|
Android
A.
Applications
are
distributed
by
Apple
App
Store
only
B.
Applications are distributed by multiple vendors with different policies on
applications.
C. Applications are distributed by multiple vendors with the exact same policies on
applications.
D.
Applications
are
distributed
by
the
Android
Market
only.
Ans:
B
40)When developing for the Android OS, Java byte code is compiled into what? |
Android
37 | P a g e
A.
B.
C.
D.
Ans:
Java
Dalvik
Dalvik
C
source
application
byte
source
code
code
code
code
41)What
does
A.
B.
C.
D.
Ans:
the
.apk
extension
stand
for?
Application
Application
Android
Program
Proprietary
Android
Android
Package
Kit
Kit
Package
42)When you distribute your application commercially,you'll want to sign it with your
own
key.
|
Android
A.
B.
Ans:
True
False
A
43)How does Google check for malicious software in the Android Market? | Android
A.
B.
C.
D.
Ans:
Every
new
app
is
scanned
by
a
virus
scanner
Users
report
malicious
software
to
Google
Google
employees
verify
each
new
app
A seperate company monitors the Android Market for Google
B
44)Which of these are not one of the three main components of the APK? | Android
A.
B.
C.
D.
Ans:
Dalvik
Native
Executable
Resources
Libraries
Webkit
D
45)What is the name of the program that converts Java byte code into Dalvik byte code?
|
Android
38 | P a g e
A.
B.
C.
D.
Ans:
Android
Interpretive
Dalvik
Dex
Interpretive
Mobile
Compiler
(AIC)
Converter
compiler
(MIC)
Compiler
46)Android
Applications
A.
B.
C.
D.
Ans:
must
After
Before
Within
be
signed.
they
they
two
Android
are
are
weeks
installed
installed
Never
installation
of
All
of
these
are
components
Native
Dalvik
of
Resources
the
APK
Libraries
executable
48)The AWT and Swing libraries have been removed from the Android library set. |
Android
A.
B.
Ans:
True
False
A
49)The R.java file is where you edit the resources for your project. | Android
A.
B.
Ans:
50)What
A.
B.
39 | P a g e
True
False
B
is
contained
The
The
list
within
the
manifest
permissions
of
strings
xml
the
used
file?
app
in
Android
requires
the
app
C.
D.
Ans:
The
All
code
choices
51)What
A.
B.
C.
D.
Ans:
source
other
is
contained
within
the
Layout
xml
file?
Android
Orientations 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.
A
52)The
emulated
device
for
android.
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 built on the hopes and dreams of baby elephants.
Ans:
A
53)Your Java source code is what is directly run on the Android device. | ANdroid
A.
B.
Ans:
True
False
B
54)The Emulator is
emulating/simulating
A.
B.
C.
D.
Ans:
identical
to running
what?
55)How
40 | P a g e
is
simulator
different
from
real
phone
|
aspects of
an
EXCEPT when
Android
Telephony
Applications
Sensors
a smart phone.
emulator?
Android
A. Emulators are only used to play old SNES games, simulators are used for software
development
B. The emulator is shipped with the Android SDK and third party simulators are not
C.
The emulator can virtualize sensors and other hardware features, while the
simulator
cannot
D.
The emulator imitates the machine executing the binary code, rather than
simulating
the
behavior
of
the
code
at
a
higher
level.
Ans:
D
56)
The
file
is
A.
B.
C.
D.
Ans:
57)An
a(an)
generated
None
activity
can
A.
B.
C.
D.
Ans:
be
thought
of
of
as
file
the
corresponding
A
A
A
An
to
Android
Automatically
Manually
Emulated
above
A
what?
Java
Java
method
object
Android
project
class
call
field
58)To create an emulator, you need an AVD. What does it stand for? | Android
A.
B.
C.
D.
Ans:
59)The
A.
B.
Ans:
41 | P a g e
Android
Android
Active
Application
Virtual
Virtual
Virtual
Virtual
Display
Device
Device
Display
B
Android
SDK
ships
with
an
emulator.
Android
True
False
Layout
Manifest
Strings
R
file
file
XML
file
61)The manifest explains what the application consists of and glues everything together.
|
Android
A.
B.
Ans:
True
False
A
62)The Android Software Development Kit (SDK) is all you need to develop
applications
for
Android.
A.
B.
Ans:
True
False
A
63)What is the driving force behind an Android application and that ultimately gets
converted
into
a
Dalvik
executable?
|
Android
A.
Java
source
code.
B.
R-file.
C.
the
emulator.
D.
the
SDK
Ans:
A
64)While developing Android applications, developers can test their apps on...
A.
B.
C.
D.
Ans:
65) How can
42 | P a g e
Emulator
included
in
Android
Physical
Android
Third-party
Emulators
(Youwave,
All
three
options
will
D
SDK
phone
etc.)
work.
A.
NEW_TASK_LAUNCH
in
the
startActivity()
method
call.
B.
FLAG_ACTIVITY_NEW_TASK in
the
startActivity()
method
call.
C.
FLAG_ACTIVITY_SINGLE_TOP in
the
startActivity()
method
call.
D.
By
using <category android:name="android.intent.category.LAUNCHER" />
this category attribute.
43 | P a g e