Android

Android

General has 98 Questions

Once installed on a device, each Android application lives in_______?

device memory
external memory
security sandbox
None of the above
Parent class of Service?

Object
Context
ContextWrapper
ContextThemeWrapper
Parent class of Activity?

Object
Context
ActivityGroup
ContextThemeWrapper
What are the Direct subclasses of Activity?

AccountAuthenticatorActivity
ActivityGroup
ExpandableListActivity
all the aove
What are the indirect Direct subclasses of Activity?

LauncherActivity
PreferenceActivity
TabActivity
All the above
What are the indirect Direct subclasses of Services?

RecognitionService
RemoteViewsService
SpellCheckerService
InputMethodService
Which component is not activated by an Intent?

Activity
Services
ContentProvider
BroadcastReceiver
When contentProvider would be activated?

Using Intent
Using SQLite
Using ContentResolver
None of the above
Which of the  important device characteristics that you should consider as you design and develop your application?

Screen size and density
Input configurations
Device features
All of the above
Which are the screen sizes in Android?

small
normal
large
All of the above
Which are the  screen densities in Android?

low density
medium density
high density
All of the above
You can shut down an activity by calling its _______ method

onDestory()
finishActivity()
finish()
None of the above
What is the difference between Activity context and Application Context?

The Activity instance is tied to the lifecycle of an Activity. while the application instance is tied to the lifecycle of the application,
The Activity instance is tied to the lifecycle of the application, while the application instance is tied to the lifecycle of an Activity.
The Activity instance is tied to the lifecycle of the Activity, while the application instance is tied to the lifecycle of an application.
None of the above
Which one is NOT related to fragment class?

DialogFragment
ListFragment
PreferenceFragment
CursorFragment
Definition of Loader?

loaders make it easy to asynchronously load data in an activity or fragment.
loaders make it easy to synchronously load data in an activity or fragment.
loaders does not make it easy to asynchronously load data in an activity or fragment.
None of the above.
How many ways to start services?

Started
Bound
a & b
None of the above.
Characteristics of the  Loaders?

They are available to every Activity and Fragment.
They provide asynchronous loading of data.
They monitor the source of their data and deliver new results when the content changes.
All of the above.
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?

Messenger
Binder
AIDL
None of the above.
If you need your interface to work across different processes, you can create an interface for the service with a ________?

Binder
Messenger
AIDL
b or c
Layouts in android?

Frame Layout
Linear Layout
Relative Layout
All of the above.
Dialog classes in android?

AlertDialog
ProgressDialog
DatePickerDialog
All of the above
If you want share the data accross the all applications ,you should go for?

Shared Preferences
Internal Storage
SQLite Databases
content provider
Difference between android api and google api?

The google API includes Google Maps and other Google-specific libraries. The Android one only includes core android libraries.
The google API one only includes core android libraries. The Android includes Google Maps and other Google-specific libraries.
None of the above.
a & b
What is Pending Intent in android?

It is a kind of an intent
It is used to pass the data between activities
It will fire at a future point of time.
None of the above.
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
How to store heavy structured data in android?

Shared Preferences
Cursor
SQlite database
Not possible

Which features are considered while creating android application?    


Screen Size
Input configuration
Platform Version
All of above
What are the debugging techniques available in android?

        

DDMS
Breaking point
Memory profiling
None of the above.
What does httpclient.execute() returns in android?

Http entity
Http response
Http result
None of the above
What is fragment life cycle in android?

onReceive()
onCreate()
onAttach()->onCreate() ?> onCreateView() ?> onActivityCreated() ?> onStart() ?> onResume()
None of the above
What is transient data in android?

Permanent data
Secure data
Temporary data
Logical data
What is the life cycle of foreground activity in android?

onCreate() ?> onStart() ?> onResume() ?> onStop() ?> onRestart
onCreate() ?> onStart() ?> onResume() ?>onStop()
onCreate() ?> onStart() ?> onResume()
None of the above
How to pass the data between activities in Android?

Intent
Content Provider
Broadcast receiver
None of the Above
What is the difference between margin and padding in android layout?

Margin is specifying the extra space left on all four sides in layout
Padding is used to offset the content of a view by specific px or dp
Both A and B are correct
Both A and B are correct
How to stop the services in android?

finish()
system.exit().
By manually
stopSelf() and stopService()
What is the life cycle of broadcast receivers in android?


send intent()
onRecieve()
implicitBroadcast()
sendBroadcast(), sendOrderBroadcast(), and sendStickyBroadcast()
What is the application class in android?


A class that can create only an object
Anonymous class
Java class
Base class for all classes
What are the debugging techniques available in android?

DDMS
Breaking point
Memory profiling
None of the above.
What are the functionalities of HTTP Client interface in android?


Connection management
Cookies management
Authentication management
All of the above
How to find the JSON element length in android JSON?

count()
sum()
add()
length()
How many protection levels are available in the android permission tag?

    

There are no permission tags available in android
Normal, kernel, application
Normal, dangerous, signature, and signatureOrsystem
None of the above
What is a thread in android?


Same as services
Background activity
Broadcast Receiver
Independent dis-patchable unit is called a thread
What is an activity in Android?

Activity performs the actions on the screen
Manage the Application content
Screen UI
None of the above
On which thread services work in android?

Worker Thread
Own Thread
Main Thread
None of the above.
On which thread broadcast receivers will work in android?


Worker Thread
Main Thread
Activity Thread
None of the Above
How many broadcast receivers are available in android?


sendIntent()
onRecieve()
implicitBroadcast()
sendBroadcast(),sendOrderBroadcast(),and sendStickyBroadcast()
What is singleton class in android?

A class that can create only one object
Anonymous class
Java class
Manifest file
What is a base adapter in android?

Base Adapter is a common class for any adapter, which can we use for both ListView and spinner
A kind of adapter
Data storage space
None of the above.
What is an HTTP client class in android?

httprequest(get/post) and returns response from the server
Cookies management
Authentication management
None of the above
What is the JSON exception in android?

    

JSon Exception
Json Not found exception
Input not found exception
None of the above
How many levels of securities are there in android?


App level security and kernel level security
Android level security
Java level security
None of the above
What is an activity in Android?

Activity performs the actions on the screen
Manage the Application content
Screen UI
None of the above

Explain android activity life cycle?    


onCreate ?> onStart ?> onActivityStarted ?> onResume ?> onPause ?> onStop ?> onActivityDistroy ?> onDestroy
OnCreate ?> onStart ?>onResume ?> onPause ?> onStop ?> onRestart ?> onDestroy
OnCreate ?> onStart ?> onPause ?> onResume ?> onStop ?> onDestroy
?>onResume
Is it possible to have an activity without UI to perform action/actions?

Not possible
Wrong question
Yes, it is possible
None of the above
How to get a response from an activity in Android?

startActivityToResult
startActiivtyForResult
Bundle
None of the above
How to kill an activity in Android?

finish
finishActivityintrequestCode
A & B
kill
What is a context in android?

It is an interface to store global information about an application
It is used to create new components.
Android has two contexts, those are getContext and getApplicationContext
All of Above
What is Pending Intent in android?

It is a kind of an intent
It is used to pass the data between activities
It will fire at a future point of time.
None of the Above
What is android view group?

Collection of views and other child views
Base class of building blocks
Layouts
None of the Above
What are the layouts available in android?

Linear Layout
Frame Layout
Table Layout
All of above
What is the difference between margin and padding in android layout?

Margin is specifying the extra space left on all four sides in layout
Padding is used to offset the content of a view by specific px or dp
Both A and B are correct
None of the above
How many sizes are supported by Android?

Android supported all sizes
Android does not support all sizes
Android supports small,normal, large and extra-large sizes
Size is undefined in android3
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 splash screen in android?

Initial activity of an application
Initial service of an application
Initial method of an application
Initial screen of an application
What is the life cycle of services in android?

onCreate?>onStartCommand?>onDestory
onRecieve
final
Service life cycle is same as activity life cycle.
On which thread services work in android?

Worker Thread
Own Thread
Main Thread
None of the above
What are the functionalities of Binder services in android?

Binder is responsible to manage the thread while using aidl in android
Binder is responsible for marshalling and un-marshalling of the data
A & B
Binder is a kind of interface
What is the difference between services and thread in android?

Services performs functionalities in the background. By default services run on main thread only
Thread and services are having same functionalities.
Thread works on services
None of the above
How to stop the services in android?

finish
system.exit.
By manually
stopSelf and stopService
How to pass the data from activity to services in android?

We can store the data in a common database and access the data on services as well as in Activity
We cannot pass data from activity to services.
Using putExtra method in intent,we can pass the data using setResult
A & C
What are the return values of on Start Command in android services?

START_STICKY
START_NOT_STICKY
START_REDELIVER_INTENT
All of the above
How to kill an activity in Android?

finish()
finishActivity(int requestCode)
A & B
kill()
Which of the following is/are are the sub classes in Android?


Action Bar Activity
Launcher Activity
Preference Activity
All of above
How many threads are there in asyncTask in android?

Only one
Two
AsyncTask doesnot have tread
None of the Above
How many applications are there in a given task in android?

Two
One
Many
Zero
Persist data can be stored in Android through

Shared Preferences
Internal/External storage
SQlite
All of above
How many ports are allocated for new emulator?


2
0
10
None of the above.
What are the functionalities of HTTP Client interface in android?


Connection management
Cookies management
Authentication management
All of the above
What is fragment in android?


JSON
Peace of Activity
Layout
None of the above
How many protection levels are available in the android permission tag?

There are no permission tags available in android
Normal,kernel,application
Normal,dangerous,signature,and signatureOrsystem
None of the above
Can a class be immutable in android?

No,it cannot
Yes,Class can be immutable
Cannot make the class as final class
None of the above
What is splash screen in android?

Initial activity of an application
Initial service of an application
Initial method of an application
Initial screen of an application
What are the functionalities of Binder services in android?

Binder is responsible to manage the thread while using aidl in android
Binder is responsible for marshalling and un-marshalling of the data
A & B
Binder is a kind of interface
How to access the context in android content provider?

Using getContext() in onCreate()
Using intent()
Using getApplicationContext() at anywhere in an application
A & C
What is singleton class in android?

A class that can create only one object
Anonymous class
Java class
Manifest file
What is JSON in android?

Java Script Object Native
Java Script Oriented Notation
None of the Above
Java Script Object Notation
How to find the JSON element length in android JSON?

count()
sum()
add()
length()
Is it possible activity without UI in android?

No,it is not possible
Yes,it is possible
We cannot say
None of the above
Is it possible activity without UI in android?

No,it is not possible
Yes,it is possible
We cannot say
None of the above
What is an interface in android?


Interface acts as a bridge between class and the outside world.
Interface is a class.
Interface is a layout file.
None of the above
How to get a response from an activity in Android?


startActivityToResult()
startActiivtyForResult()
Bundle()
None of the above
How to pass the data from activity to services in android?

We can store the data in a common database and access the data on services as well as in Activity
We cannot pass data from activity to services.
Using putExtra() method in intent, we can pass the data using setResult()
A & C
What is sleep mode in android?

Only Radio interface layer and alarm are in active mode
Switched off
Air plane mode
None of the Above
How to get current location in android?


Using with GPRS
Using location provider
A & B
SQlite
What is ADB in android?

Image tool
Development tool
Android Debug Bridge
None of the above.
How to fix crash using log cat in android?


Gmail
log cat contains the exception name along with the line number
None of the above.
Google search
What is a GCM in android?

Goggle Could Messaging for chrome
Goggle Count Messaging
Goggle Message pack
None of the above
What is ANR responding time in android?

10 sec
5 sec
1 min
None of the above