Categories

NIIT – DMAAP Question Sets

Questions Related to Android Development

Sahaja Verma

GNIIT (Term-4), NIIT Meerut

SET-1

Which one of the following components executes as a background process on the device/emulator?

Server
Client
Daemon
Middleware


You have created a mobile app. Now, you want to see how this app should appear and behave on a real Android-enabled mobile device. How will you achieve this?

You have to use AVD
You have to use ADB
You have to use DDMS
You have to use JDWP


Predict the output of the following command: sqlite3 MyDatabase

It will create a database file named MyDatabase.mdb
It will create a database file named MyDatabase.dbf
It will cause an error
It will create a database file named MyDatabase.db


A service is said to be in the started form when an app component, such as an activity, starts it by calling the ____ method.

start()
bindService()
startSelf()
startService()


You want to start a service named myService from an app component. Identify the code snippet that you will use to accomplish this task.

Intent i = new Intent(myService.class, this); startService(i);

Intent i = new Intent(myService.class, this); start(i);

Intent i = new Intent(this, myService.class); startService(i);

Intent i = new Intent(this, myService.class); start(i);


Which one of the following methods retrieves FrameLayout that holds the tab content?

setup()
setContent()
newTabSpec()
getTabContentView()


You want to remove all tabs from the tab widget that is associated with the tab host. Which one of the following options will you use?

clear()
clearAll(()
clearTabs()
clearAllTabs()


Which one of the following notifications automatically disappears after few seconds and does not involve user interaction?

Status bar notification
Toast notification
Dialog notification
Progress dialog notification


You are developing an Android app in which you want to set an alarm. You also want to ensure that the alarm fires an explicit intent but does not wake up the device if it goes off while the device is in the sleep mode. Which one of the following alarm types will you use to accomplish this task?

RTC_WAKEUP
RTC
ELAPSED_REALTIME_WAKEUP
ELAPSED_REALTIME


What are the three types of location controls available in an emulator?

Automatic, GPX, and KML
Manual, GPX, and KML
Manual, GPX, and VML
Automatic, GPX, and VML


Which one of the following constants indicates that an SMS was not sent because no service was available?

SmsManager.RESULT_ERROR_NO_SERVICE
SmsManager.ERROR_NO_SERVICE
Activity.RESULT_NO_SERVICE
Activity.RESULT_ERROR_NO_SERVICE


You need to obtain an instance of the SMS manager service of the device. Which one of the following code snippets will you use?

SmsManager smsManager = new SmsManager(Activity.getDefault());

SmsManager smsManager = new SmsManager(getDefault());

SmsManager smsManager = Activity.getDefault();

=SmsManager smsManager = SmsManager.getDefault();


Design a site like this with WordPress.com
Get started