Consider the code snippet below: public class MyReceiver extends PhoneStateIntentReceiver { @Override public void onReceiveIntent(Context context, Intent intent) { if (...
When the device receives an incoming phone call. 13.0%
When an outgoing phone call is initiated on the device. 59.0%
When the user presses the CALL button on the device. 1.0%
The code in will never get executed. 25.0%
Consider the code snippet below: MediaPlayer mp = new MediaPlayer(); mp.setDataSource(PATH_TO_FILE); <Some code here> mp.start(); Which of the following should be placed at <Some code here>?
mp.prepare(); 68.0%
mp.prepareAsync(); 30.0%
mp.loadMedia(); 0.0%
mp.loadSource(); 0.0%
mp.loadSource(); mp.prepare(); 1.0%
No code is required at <Some code here> to start playback. 0.0%
Consider the code snippet below: MediaPlayer mp = new MediaPlayer(); mp.setDataSource(PATH_TO_FILE); <Some code here> mp.start(); Which of the following should be placed at <Some code here>?
mp.prepare(); 67.0%
mp.prepareAsync(); 32.0%
mp.loadMedia(); 0.0%
mp.loadSource(); 0.0%
mp.loadSource(); mp.prepare(); 0.0%
No code is required at <Some code here> to start playback. 0.0%
Consider the following snippet of code: @Override protected void onStop { Super.onStop(); SharedPreferences setting = getSharedPreferences("MyPrefs", 0); SharedPreferences.Editor editor = settings...
editor.save(); editor.close(); 0.0%
editor.save(); editor.finish(); 0.0%
editor.commit(); 100.0%
editor.save(); 0.0%
editor.close(); 0.0%
editor.finish(); 0.0%
Consider the following snippet of code: <font size =2> @Override protected void onStop { Super.onStop(); SharedPreferences setting = getSharedPreferences("MyPrefs", 0); SharedPreferences.Editor edi...
editor.save(); editor.close(); 0.0%
editor.save(); editor.finish(); 0.0%
editor.commit(); 100.0%
editor.save(); 0.0%
editor.close(); 0.0%
editor.finish(); 0.0%
Consider the XML fragment below, which is taken from one of the files in an Android project: <MyElement xmlns:"http://schemas.androd.com/apk/res/android" android:layout_width = "fill_pare...
It is taken from the manifest xml file of the Android project. 0.0%
It is taken from an XML file used to define a view. 35.0%
It is taken from the package file (.apk) of the Android project. 0.0%
The xmlns: attribute is a compulsory attribute. 6.0%
If this is not the outer most tag in the XML file then it need not contain the xmlns: attribute. 12.0%
MyElement should be the name of a class derived, directly or indirectly, from the View class. 45.0%
Consider the XML fragment below, which is taken from one of the files in an Android project: <MyElement xmlns:"http://schemas.androd.com/apk/res/android" android:layout_width = "fill_parent...
It is taken from the manifest XML file of the Android project. 0.0%
It is taken from an XML file used to define a view. 38.0%
It is taken from the package file (.apk) of the Android project. 0.0%
The xmlns: attribute is a compulsory attribute. 4.0%
If this is not the outer most tag in the XML file then it need not contain the xmlns: attribute. 16.0%
MyElement should be the name of a class derived, directly or indirectly, from the View class. 40.0%
Fill in the blank: Once an app is published, the ________ cannot be changed. It should be unique for each APK.
private key 2.0%
package name 97.0%
main activity 0.0%
APK file name 0.0%
How many expansion files can an APK file have? Select all correct options.
one 30.0%
two 67.0%
three 1.0%
four 0.0%
Select the two function calls that can be used to start a Service from your Android application?
bindService 43.0%
startService 53.0%
runService 2.0%
startActivity 1.0%
Suppose MyView is a class derived from View and mView is a variable of type MyView. Which of the following should be used to display mView when the Android application is started?
Call setCurrentView(mView) in the startApp() of the main application class. 0.0%
Call setContentView(mView) in the startApp() of the main application class. 0.0%
Call setContentView(mView) in the onStart() of the main application class. 0.0%
Call setContentView(mView) in the onCreate() of the main application class. 100.0%
Suppose Screen1 is the main screen of an Android application MyAndroid. Now if another screen, Screen2 has to be opened from Screen1, then which of the following are true?
Screen2 has to be a part of MyAndroid. 11.0%
Screen2 can exist in any other Android application installed on the device. 30.0%
Screen2 will always be launched asynchronously. 7.0%
Screen2 can be launched synchronously. 4.0%
Screen2 can return a result code to Screen1 if launched with startActivity. 1.0%
Screen2 can return a result code to Screen1 if launched with startActivityForResult. 44.0%
Using a content provider, which of the following operations are able to perform? a) create b) read c) update d) delete
a, b and c 0.0%
b, c and d 61.0%
all of these 38.0%
none of these 0.0%
What does the following code do? public boolean isOnline() { ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = con...
checking Network connection. 100.0%
checking only WIFI network connectivity. 0.0%
checking only Bluetooth data connection. 0.0%
checking only Ethernet data connection 0.0%
What does the following code do? SensorManager mgr = (SensorManager) getSystemService(SENSOR_SERVICE); List<Sensor> sensors = mgr.getSensorList(Sensor.TYPE_ALL); for (Sensor sensor : sensors) { ...
prints names of all available sensors in device 97.0%
prints names of all available sensor types in device 0.0%
prints names of all sensors which are not available 0.0%
none of above 2.0%
What does the following code do? try { String token = GoogleAuthUtil.getToken(this, email, "https://www.googleapis.com/auth/devstorage.read_only"); System.out.println(token); } catch (IOEx...
prints token 88.0%
prints IOException 0.0%
prints UserRecoverableAuthException 0.0%
prints GoogleAuthException 11.0%
What does the following statement define? It provides query(), insert(), update(), and delete() methods for accessing data from a content provider and invokes identically-named methods on an insta...
CursorLoader 0.0%
ContentResolver 97.0%
ContentProvider 2.0%
Loader 0.0%
What is "Android-activityCreator"?
A command line tool to create Android project files. 97.0%
A framework to create unit tests for Android projects. 2.0%
A resource editor to create user interface for Android applications. 0.0%
A tool to generate Android byte code from .class files. 0.0%
An emulator to execute and debug Android projects. 0.0%
What is "Android-dx"?
A command line tool to create Android project files. 2.0%
A framework to create unit tests for Android projects. 0.0%
A resource editor to create user interface for Android applications. 2.0%
A tool to generate Android byte code from .class files. 92.0%
An emulator to execute and debug Android projects. 2.0%
What is "Android-Positron"?
A command line tool to create Android project files. 0.0%
A framework to create unit tests for Android projects. 97.0%
A resource editor to create user interface for Android applications. 0.0%
A tool to generate Android byte code from .class files. 2.0%
An emulator to execute and debug Android projects. 0.0%
What is Android?
A new programming language that can be used to develop applications for mobile devices. 2.0%
A new IDE that can be used to develop applications for mobile devices. 0.0%
A software stack for mobile devices that includes an operating system, middleware and key applications. 97.0%
A new mobile device developed by Google. 0.0%
What is correct regarding GCM - Google Cloud Messaging service?
It does server to device communication. 3.0%
It does device to server communication. 0.0%
It does device to server communication and vice versa. 96.0%
It does device to device communication. 0.0%
What is the advantage of using AsyncTaskLoader instead of AsyncTask?
a bit easier to work with 3.0%
the possibility easily update progress bar 3.0%
no comparison, because it implements completely different functionality 3.0%
less work with the configuration of application 89.0%
What is the best way of opening camera as sub-activity?
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivity(takePictureIntent); 0.0%
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(getPackageManager()) != null) { startActivityForResult(takePictureIntent, 1); } 96.0%
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(takePictureIntent, 1); 3.0%
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(getPackageManager()) != null) { startActivityForResult(takePictureIntent, -1); } 0.0%
What is the correct way to fix if checking the status of the GPS_PROVIDER throws SecurityException?
request permission for ACCESS_COARSE_LOCATION 0.0%
request permission for ACCESS_FINE_LOCATION 100.0%
request permission for INSTALL_LOCATION_PROVIDER 0.0%
None of the above 0.0%
What is the correct way to restrict app visibility on Google Play to devices that have a camera?
<uses-feature android:name="android.hardware.camera"/> 7.0%
<uses-feature android:name="android.hardware.camera" android:required="true" /> 85.0%
<uses-feature android:name="android.hardware.camera.front" android:required="true" /> 3.0%
<uses-permission android:name="android.permission.CAMERA"/> 3.0%
What is the interface Spannable used for?
Manipulate text that can span across multiple pages. 0.0%
Manipulate text that can span across multiple TextView windows. 0.0%
This is the interface for text to which markup objects can be attached and detached. 100.0%
String parsing. 0.0%
What is the ListActivity class used for?
Create a view to display a list of items from a data source. 100.0%
List all the activities currently running on the Android device. 0.0%
List all the activites that are installed on the Android device. 0.0%
List the activities whose IntentFilters match with a particular Intent type. 0.0%
What is the maximum supported file size for a single APK file (excluding expansion packages) in the Google Play Store?
50MB 96.0%
2GB 3.0%
30MB 0.0%
unlimited 0.0%
What is the maximum supported size for a single expansion file in the Google Play Store?
50MB 3.0%
2GB 96.0%
30MB 0.0%
unlimited 0.0%
What is the purpose of the ContentProvider class?
To play rich media content files. 0.0%
To create and publish rich media files. 0.0%
To share data between Android applications. 100.0%
To access the global information about an application environment. 0.0%
To maintain global application state. 0.0%
Which of the following 4 classes does not relate to others? ApplicationInfo, SyncInfo, ActivityInfo, PackageInfo
ApplicationInfo 0.0%
SyncInfo 100.0%
ActivityInfo 0.0%
PackageInfo 0.0%
Which of the following are Android build modes?
Debug mode 52.0%
Release mode 47.0%
Production mode 0.0%
Development mode 0.0%
Which of the following are classes that can be used to handle the Bluetooth functionality on a device?
Adapte 0.0%
Manage 0.0%
Matche 0.0%
BluetoothAdapte 100.0%
Which of the following are true about enabling/disabling menu items from an Activity class?
onCreateOptionsMenu can be used to enable/disable some menu items in an Android application. 0.0%
onPrepareOptionsMenu can be used to enable/disable some menu items in an Android application. 100.0%
onShowOptionsMenu can be used to enable/disable some menu items in an Android application. 0.0%
The menu items in an Android application cannot be disabled. 0.0%
Which of the following are true about Intent.CALL_ACTION and Intent.DIAL_ACTION?
Both of them are used to dial a phone number on the device. 29.0%
Intent.action == Intent.CALL_ACTION is true when a phone call is received on the device. 0.0%
Intent.action = Intent.CALL_ACTION is used when a phone number is to be dialled without showing a UI on the device. 41.0%
Intent.action = Intent.DIAL_ACTION is used when a phone number is to be dialled without showing a UI on the device. 0.0%
Intent.action = Intent.CALL_ACTION is used when a phone number is to be dialled without the user having to explicitly initiate the call. 12.0%
Intent.action = Intent.DIAL_ACTION is used when a phone number is to be dialled without the user having to explicitly initiate the call. 16.0%
Which of the following are true about PhoneStateIntentReceiver.notifyPhoneCallState?
notifyPhoneCallState has to be called if your application wishes to receive a notification about an incoming phone call. 85.0%
notifyPhoneCallState is a call back function that is called when the call state changes. 0.0%
notifyPhoneCallState is called to initiate a call from the device. 0.0%
notifyPhoneCallState is used to send notifications about call states. 0.0%
notifyPhoneCallState gets called when the device receives an incoming phone call. 15.0%
Which of the following are true?
Both startActivity and startSubActivity start an activity synchronously. 44.0%
Both startActivity and startActivityForResults start an activity asynchronously. 52.0%
startActivity is an asynchronous call, but startSubActivity is synchronous. 0.0%
startActivity is a synchronous call, but startSubActivity is asynchronous. 4.0%
startActivity and startActivityForResult can both be used to start a new activity from your activity class. 43.0%
Only startActivityForResult can be used to launch a new activity from your activity class. 0.0%
startActivity(myIntent); and startActivityForResult(myIntent, -1); have the same result. 24.0%
startActivity(myIntent); and startActivityForResult(myIntent, 0); have the same result. 1.0%
When startActivity is used to launch a new activity from your activity class then your activity class gets notified when the new activity is completed. 0.0%
When startActivityForResult is used to launch a new activity from your activity class then your activity class gets notified when the new activity is completed. 29.0%
Which of the following are UI elements that you can use in a window in an Android application?
TextBox 1.0%
TextView 49.0%
TextField 0.0%
TextElement 0.0%
EditText 49.0%
RichText 0.0%
Which of the following are valid features that you can request using requestWindowFeature?
FEATURE_NO_TITLE 53.0%
FEATURE_NO_ICON 0.0%
FEATURE_RIGHT_ICON 46.0%
FEATURE_NO_MENU 0.0%
FEATURE_TRANSPARENT_WINDOW 0.0%
Which of the following are valid ways to deploy an Android application to a device?
Using the "adb install /path/to/apk" command from the command prompt/terminal, when USB Debugging Mode is enabled in the device. 0.0%
Exporting and signing the package, then browsing it to install. 0.0%
Launching the application from an IDE, when USB Debugging Mode is enabled in the device. 0.0%
All of these. 100.0%
Which of the following attributes in the manifest file defines version information of an application for the Google Play Store (as opposed to defining version information for display to users)?
android:versionCode 100.0%
android:versionName 0.0%
android:targetSdkVersion 0.0%
android:maxSdkVersion 0.0%
Which of the following can be accomplished by using the TelephoneNumberUtil class?
Save a phone number to the contacts in the phone device. 0.0%
Retrieve a phone number from the contacts in the phone device. 0.0%
Delete a phone number from the contacts in the phone device. 0.0%
Format an international telephone number. 100.0%
Setting and retrieving the call forwarding phone number on the phone device. 0.0%
Which of the following can be used to bind data from an SQL database to a ListView in an Android application?
SimpleCursor 0.0%
SimpleCursorAdapter 91.0%
SimpleAdapter 4.0%
SQLiteCursor 4.0%
SQLLiteAdapter 0.0%
Which of the following can be used to handle commands from menu items in an Android application?
commandAction 0.0%
onMenuItem 0.0%
onMenuItemSelected 31.0%
onMenuItemClicked 0.0%
onOptionsItemSelected 68.0%
Which of the following can be used to navigate between screens of different Android applications?
Binde 0.0%
Flow 0.0%
Navigate 0.0%
Intent 100.0%
ApplicationContext 0.0%
Which of the following can you use to add items to the screen menu?
Activity.onCreate 0.0%
Activity.onCreateOptionsMenu 53.0%
Constructor of the Activity class. 4.0%
Activity.onCreateMenu 0.0%
Activity.onStart 0.0%
Activity.onPrepareOptionsMenu 42.0%
Which of the following can you use to display a progress bar in an Android application?
ProgressBa 17.0%
ProgressDialog 82.0%
ProgressItem 0.0%
Which of the following can you use to display an HTML web page in an Android application?
WebBrowser 0.0%
BrowserView 0.0%
WebView 100.0%
Browser 0.0%
HtmlView 0.0%
Which of the following classes is not used in working with database?
SQLiteOpenHelper 0.0%
SQLiteDatabase 0.0%
ContentProvider 9.0%
DatabaseHelper 90.0%
Which of the following fields of the Message class should be used to store custom message codes about the Message?
tag 8.0%
what 92.0%
arg1 0.0%
arg2 0.0%
userData 0.0%
Which of the following formats is not supported in Android?
MP4 4.0%
MPEG 0.0%
AVI 95.0%
MIDI 0.0%
Which of the following functions will return all available Content Providers?
List<ProviderInfo> returnList = new ArrayList<ProvderInfo>(); for (PackageInfo pack : getPackageManager().getInstalledPackages(PackageManager.GET_PROVIDERS)) { ProviderInfo[] providers = pack.providers; if (providers != null) { returnList.addAll(Arrays.asList(providers)); } } return returnList; 100.0%
return getContext().getPackageManager().queryContentProviders("com.google", Process.myUid(), 0); 0.0%
List<ActivityInfo> returnList = new ArrayList<ActivityInfo>(); for (PackageInfo pack : getPackageManager().getInstalledPackages(PackageManager.GET_RECEIVERS)) { ActivityInfo[] providers = pack.receivers; if (providers != null) { returnList.addAll(Arrays.asList(providers)); } } return returnList; 0.0%
None of these. 0.0%
Which of the following Integrated Development Environments can be used for developing software applications for the Android platform?
Android IDE 0.0%
Eclipse 100.0%
Visual Studio 2005 0.0%
Visual Studio 2008 0.0%
Which of the following is correct to use for data transfer regularly and efficiently, but not instantaneously?
AsyncTask 0.0%
IntentService 0.0%
Sync adapters 100.0%
All of these 0.0%
Which of the following is not a life-cycle methods of an Activity that can be implemented to perform various operations during the lifetime of an Activity?
onCreate 0.0%
onInit 31.0%
onCompleteThaw 68.0%
onRestart 0.0%
Which of the following is not Content Provider?
Contacts 0.0%
Shared Preferences 95.0%
MediaStore 0.0%
Bookmarks 0.0%
Settings 4.0%
Which of the following is the best way to request user permission if an Android application receives location updates from both NETWORK_PROVIDER and GPS_PROVIDER?
Adding this line to the Android manifest file: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 32.0%
Adding these two lines to the Android manifest file: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 68.0%
Adding this line to the Android manifest file: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 0.0%
Adding this line to the Android manifest file: <uses-permission android:name="android.permission.CONTROL_LOCATION_UPDATES" /> 0.0%
Which of the following is the immediate base class for Activity and Service classes?
Application 0.0%
ApplicationContext 0.0%
Context 100.0%
Component 0.0%
Object 0.0%
Which of the following is the parent class for the main application class in an Android application that has a user interface?
MIDLet 0.0%
AndroidApp 0.0%
Activity 95.0%
AppLet 0.0%
Application 4.0%
Which of the following is/are appropriate for saving the state of an Android application?
Activity.onFreeze() 0.0%
Activity.onPause() 100.0%
Activity.onStop() 0.0%
Activity.onDestroy() 0.0%
Which of the following packages provide the classes required to manage the Bluetooth functionality on an Android device?
android.hardware 0.0%
android.bluetooth 100.0%
android.bluez 0.0%
org.bluez 0.0%
Which of the following permissions and configurations must be added in manifest file for implementing GCM Client? A) com.google.android.c2dm.permission.RECEIVE B) android.permission.INTERNET C) an...
A, B, C and D 0.0%
C, D, E and F 0.0%
A, B, E and F 9.0%
all of these 90.0%
Which of the following permissons is needed to perform the network operations through internet? a) INTERNET b) ACCESS_NETWORK_STATE
a 52.0%
b 0.0%
both 48.0%
none 0.0%
Which of the following procedures will get the package name of an APK file?
Looking for the package attribute's value of the <manifest> element in the manifest file. 30.0%
Executing the command, "pm list packages -f", in the ADB shell. 8.0%
Programmatically, using PackageManager in an installed Android app. 34.0%
Using the AAPT platform tool, "aapt dump badging apkName.apk". 28.0%
Which of the following programming languages can be used to develop software applications for the Android platform?
Java 100.0%
C# with .NET Compact Framework for mobile devices. 0.0%
C programming language. 0.0%
Android programming language. 0.0%
Which of the following protocols are provided by Google for GCM Connection Servers? A) HTTP B) XMPP C) SOAP D) RMI
A and B 95.0%
A, B, C 4.0%
C, D 0.0%
all of these 0.0%
Which of the following sensors is only hardware-based?
linear acceleration sensor 0.0%
gravity sensor 0.0%
rotation vector sensor 0.0%
accelerometer sensor 100.0%
Which of the following should be used to save the unsaved data and release resources being used by an Android application?
Activity.onStop() 13.0%
Activity.onPause() 8.0%
Activity.onDestroy() 78.0%
Activity.onShutdown() 0.0%
Activity.onFreeze() 0.0%
Which of the following statement is correct regarding StrictMode?
StrictMode detects improper layouts 0.0%
StrictMode detects operation which blocks UI 10.0%
StrictMode detects the speed of the connection 0.0%
All of the above 89.0%
Which of the following statements are correct with regards to calling place GoogleAuthUtil.getToken()? A) call getToken() on the UI thread B) call getToken() on AsyncTask
Statement A is true, while Statement B is false. 0.0%
Statement B is true, while Statement A is false. 100.0%
Both statements are true. 0.0%
Both statements are false. 0.0%
Which of the following statements are correct with regards to Content Providers? A) A content provider allows applications to access data. B) A content provider must be declared in the AndroidMani...
Statement A is true, while Statement B is false. 0.0%
Statement B is true, while Statement A is false. 0.0%
Both statements are true. 100.0%
Both statements are false. 0.0%
Which of the following statements are correct with regards to publishing updates of apps on Google Play?
The android:versionCode attribute in the manifest file must be incremented and the APK file must be signed with the same private key. 95.0%
The android:versionCode attribute in the manifest file must be same and the APK file must be signed with the same private key. 4.0%
The android:versionCode attribute in the manifest file must be incremented and the APK file must be signed with the new private key. 0.0%
The android:versionCode attribute in the manifest file must be same and the APK file must be signed with the new private key. 0.0%
Which of the following statements are correct with regards to running of the Sync Adapter? A) Running sync adapter in response to a user request. B) Running sync adapter periodically by setting a ...
Statement A is true, while Statement B is false. 0.0%
Statement B is true, while Statement A is false. 0.0%
Both statements are true. 15.0%
Both statements are false. 84.0%
Which of the following statements are correct with regards to signing applications? a) All applications must be signed. b) No certificate authority is needed. c) When releasing application special...
a) and b) are true 30.0%
a) and c) are true 0.0%
b) and c) are true 0.0%
all statements are true 69.0%
Which of the following tools can be used to reduce apk package size?
lint 0.0%
ProGuard 80.0%
zipalign 20.0%
etc1tool 0.0%
Which of the following widgets helps to embed images in activities?
ImageView 33.0%
ImageButton 0.0%
both of above 66.0%
none of these 0.0%
Which of the following would you have to include in your project to use the APIs and classes required to access the camera on the mobile device?
import android.drivers; 0.0%
import android.hardware.camera; 91.0%
import android.camera; 0.0%
import android.util; 0.0%
import android.hardware; 8.0%
Which of the following would you have to include in your project to use the SimpleAdapter class?
import android.content; 0.0%
import android.widget; 100.0%
import android.database; 0.0%
import android.database.sqlite; 0.0%
import android.util; 0.0%