MCQs > IT & Programming > Android Programming MCQs > Basic Android Programming MCQs

Basic Android Programming MCQ

1. The _____ is a possible media type value for the media attribute.

Answer

Correct Answer: Embossed

Note: This Question is unanswered, help us to find answer for this one

2. To hide a selected column, click the _____ button in the cells group on the home tab.

Answer

Correct Answer: Format

Note: This Question is unanswered, help us to find answer for this one

3. ____ is a linux-based operating system developed by the open handset alliance.

Answer

Correct Answer: Android

Note: This Question is unanswered, help us to find answer for this one

4. After deploying a user generated test JAR file to the test device using uiautomator tool. which Of the following commands is used for running the test?

Answer

Correct Answer: adb shell uiautomator runtest LaunchSettings.jar -c com.uia.example.my.LaunChSetting

Note: This Question is unanswered, help us to find answer for this one

5. In order to use the MonkeyDevice class in Android Studio. a command is used for creating a new object from a connection to a device or emulator. What is the correct syntax of that command?

Answer

Correct Answer: mydevice = MonkeyRunner.waitForConnection()

Note: This Question is unanswered, help us to find answer for this one

6.

Which of the following is the correct syntax for changing the test build type to "staging" in your module-level build.gradle f‌ile using Android Studio?

Answer

Correct Answer:

 android [

testBuildType

]


Note: This Question is unanswered, help us to find answer for this one

7.

In Android Studio, which of the following options of etcl tool command line utility is used for creating a PNG f‌ile from an ETC1 file?


Answer

Correct Answer:

-decode   


Note: This Question is unanswered, help us to find answer for this one

8. In Android Studio, which of the following is the correct syntax for using screencap command from the command line in order to take a screenshot of a device display?

Answer

Correct Answer: S adb shell screencap /sdcard/screen.png

Note: This Question is unanswered, help us to find answer for this one

9. Which of the following is the correct syntax of CSS partial match that will use the "checkName" part in the middle of the ID of an element "abc_checkName_xyz" to match and find the element in Selenium?

Answer

Correct Answer: lnput[id'='checkName']

Note: This Question is unanswered, help us to find answer for this one

10. While running tests against Safari on a real iOS device, what is the use of "iOS-webkit-debug-proxy"?

Answer

Correct Answer: It is used to access web views on iOS device.

Note: This Question is unanswered, help us to find answer for this one

11. Which of the following tools help(s) a user in analyzing their application's Ul in different orientations?

Answer

Correct Answer: uiautomatorviewer

Note: This Question is unanswered, help us to find answer for this one

12.

In Android Studio, which of the following features are provided by the Ul/Application Exerciser Monkey?

i) It provides Options for Operational constraints, for example, restricting the test to a single

package.

ii) It provides options for event types and frequencies.

iii) It provides basic conf‌iguration Options.

iv) It provides debugging options.


Answer

Correct Answer:

All options 0, ii), iii), and iv)  


Note: This Question is unanswered, help us to find answer for this one

13. In Android Studio, which of the following is the correct syntax of the shell command used for listing all the available shell programs?

Answer

Correct Answer: adb shell ls lsystem/bin

Note: This Question is unanswered, help us to find answer for this one

14.

Which of the following is the correct syntax of the command that is executed for using Monkey tool on the default Android Ul application, given that the user has already navigated to the required directory and connected the Android device with the PC?


Answer

Correct Answer:

adb shell monkey -p your.package.name -v 500


Note: This Question is unanswered, help us to find answer for this one

15. In your JUnit 4 test class, which of the following annotations would you use for specifying static methods for each test class to invoke only once?

Answer

Correct Answer: @BeforeClass

Note: This Question is unanswered, help us to find answer for this one

16.

Which of the following commands is used by Selenium grid for checking the ports used by all running programs on your machine?


Answer

Correct Answer:

netstat -a 


Note: This Question is unanswered, help us to find answer for this one

17. In Android Studio, which of the following tools allows the users to debug and optimize their user interface?

Answer

Correct Answer: Hierarchy Viewer

Note: This Question is unanswered, help us to find answer for this one

18.

Which of the following arguments is NOT used by the alert method, of MonkeyRunner class, that displays an alert dialog to the process running the current program?

Answer

Correct Answer:

format 


Note: This Question is unanswered, help us to find answer for this one

19.

As a test engineer of an IT organization if you are required to check whether or not the target app returns the correct UI output in response to user interactions in the activities of the app, then which of the following types of testing would you use?


Answer

Correct Answer:

Components within your app only (Integration Test)


Note: This Question is unanswered, help us to find answer for this one

20. Which of the following tools, in Android Studio, allows the user to analyze his/her application's execution in the context of system processes, to help in the diagnosis of display and performance issues?

Answer

Correct Answer: Systrace

Note: This Question is unanswered, help us to find answer for this one

21. While using Android studio, which of the following commands would you run in order to run your instrumented unit tests with Cradle?

Answer

Correct Answer: lgradlew CAT

Note: This Question is unanswered, help us to find answer for this one

22.

Which of the following is the correct syntax of the ui automator tool command that is used for deploying the user generated test JAR file to the test device?


Answer

Correct Answer:

adb push ldata/Iocal/tmp/ 


Note: This Question is unanswered, help us to find answer for this one

23. Which of the following selendroid-standalone command line parameters Specifies the port for selendroid-standalone to run on?

Answer

Correct Answer: -port

Note: This Question is unanswered, help us to find answer for this one

24.

In Android Studio, which of the following debugging tools provides the user a graphical viewer for execution logs saved by the user

Answer

Correct Answer:

traceview 


Note: This Question is unanswered, help us to find answer for this one

25. ln Android Studio, which Of the following logs is compiled in but stripped at runtime?

Answer

Correct Answer: debug log

Note: This Question is unanswered, help us to find answer for this one

26.

Which Of the following is the correct syntax of the activity manager command used for starting prof‌ile on and writing results to ?


Answer

Correct Answer:

prof‌ile start


Note: This Question is unanswered, help us to find answer for this one

27. Which of the following is the correct syntax of a command for launching the Monkey in a quiet. non-verbose mode in Android Studio?

Answer

Correct Answer: S adb shell monkey [Options]

Note: This Question is unanswered, help us to find answer for this one

28.

Suppose. you want to analyse the UI components of an application that is to be tested. You have already connected your Android device to your deployment machine, Opened the terminal window, and navigated to ltoolsl. The next step is to run the uiautomatorviewer tool. Which of the following commands will you use to run this tool?


Answer

Correct Answer:

uiautomatorviewer 


Note: This Question is unanswered, help us to find answer for this one

29.

While using Selendroid, which of the following properties specifies the app id of a native or hybrid app under test?


Answer

Correct Answer:

aut 


Note: This Question is unanswered, help us to find answer for this one

30.

In Android Studio, which of the following tools is used for shrinking, optimizing, and obfuscating the user

Answer

Correct Answer:

ProGuard 


Note: This Question is unanswered, help us to find answer for this one

31. Which of the following methods in Selendroid starts a mobile web testing session?

Answer

Correct Answer: SelendroidCapabilities.android( )

Note: This Question is unanswered, help us to find answer for this one

32. Extending your class with TestCase class and implementing which of the following methods allows you to use a JUnit TestCase?

Answer

Correct Answer: setUp()

Note: This Question is unanswered, help us to find answer for this one

33. Which of the following tools provides an API for writing programs that are used for controlling an Android device or emulator from outside of Android code?

Answer

Correct Answer: monkeyrunner

Note: This Question is unanswered, help us to find answer for this one

34.

In Android Studio. which of the following is the correct return type of MonkeyDevice waitForConnection (float timeout, string deviceld) method that tries to establish a connection between the monkeyrunner backend and the specif‌ied device or emulator?


Answer

Correct Answer:

MonkeyDevice instance for the device or emulator. 


Note: This Question is unanswered, help us to find answer for this one

35. While working on Android Studio, which of the following commands is used for importing the Python modules?

Answer

Correct Answer: from com.android.monkeyrunner import

Note: This Question is unanswered, help us to find answer for this one

36.

In Android Studio, which of the following is the correct syntax of the method used for waking the screen of Mon keyDevice?

Answer

Correct Answer:

void wake ()   


Note: This Question is unanswered, help us to find answer for this one

37.

ln Android Studio, which of the following keys would you press to add a line breakpoint after you have located the code line where you wish to pause the execution and placed the caret on that line?

(Consider the operating system to be Windows.)


Answer

Correct Answer:

 Control+F8 


Note: This Question is unanswered, help us to find answer for this one

38. While running some tests against an Android device using Selenium, which of the following commands can be used to forward the HTTP traffic to the device?

Answer

Correct Answer: adb -s forward tcp:8080 tcp:8080

Note: This Question is unanswered, help us to find answer for this one

39. ln Android Studio, what is the function of the Thread.dumpStack0 method?

Answer

Correct Answer: It is used for printing a stack trace at any point in an app code

Note: This Question is unanswered, help us to find answer for this one

40. With which of the following tools is the Ul/Application Exerciser Monkey tool run in order to send pseudo-random streams of keystrokes, touches, and gestures to an Android device?

Answer

Correct Answer: adb tool

Note: This Question is unanswered, help us to find answer for this one

41. Which of the following is the correct Java syntax for retrieving the innerText value contained within an element?

Answer

Correct Answer: WebElement element = driverftndElement(By.id())

Note: This Question is unanswered, help us to find answer for this one

42. Which of the following is an argument of the sleep method of MonkeyRunner class that pauses the current program for a specified amount of time?

Answer

Correct Answer: Seconds

Note: This Question is unanswered, help us to find answer for this one

43. In Android Studio, which Of the following monkeyrunner API class provides methods for installing and uninstalling packages and is also used for running test packages?

Answer

Correct Answer: MonkeyDevice

Note: This Question is unanswered, help us to find answer for this one

44. While using uiautomator tool, what is the correct syntax of the command that needs to be executed for creating the required build configuration f‌iles for building the output JAR?

Answer

Correct Answer: /tooIs/android create uitest-project -n -t1 -p

Note: This Question is unanswered, help us to find answer for this one

45. Which of the following debug types can you use if you wish to use only LLDB for debugging your code where Java debugger session view is NOT available?

Answer

Correct Answer: Native

Note: This Question is unanswered, help us to find answer for this one

46. In Android Studio, which of the following options of the Monkey command stops the Monkey from executing until a debugger is attached to it?

Answer

Correct Answer: —wait-dbg

Note: This Question is unanswered, help us to find answer for this one

47. In Android Studio, which of the following is the correct syntax for using jobb in order to dump the contents of an existing 088 f‌ile?

Answer

Correct Answer: $ jobb -d ltemp/obb-output/ -o my-app-assets.obb -k secret-key

Note: This Question is unanswered, help us to find answer for this one

48. Which of the following is the correct format of logcat messages?

Answer

Correct Answer: date time PlD-TlD/package priority/tag: message

Note: This Question is unanswered, help us to find answer for this one

49. While using Appium tool, what is the function of the following command? > appium --nodeconfig /path/to/nodeconfig.json

Answer

Correct Answer: it is used to register Appium server with a local selenium grid

Note: This Question is unanswered, help us to find answer for this one

50. Which of the following statements is correct about GPU tracing in Android Studio?

Answer

Correct Answer: GPU tracing does not modify the user's APK.

Note: This Question is unanswered, help us to find answer for this one

51. In Android Studio, which of the following is the correct command for generating an API reference for monkeyrunner?

Answer

Correct Answer: monkeyrunner help.py

Note: This Question is unanswered, help us to find answer for this one

52. Which of the following is the correct syntax of zipalign command for confirming the alignment of existing.apk?

Answer

Correct Answer: zipalign -c -v existing.apk

Note: This Question is unanswered, help us to find answer for this one

53. Which of the following is the correct syntax of monkeyrunnner command used in Android Studio?

Answer

Correct Answer: monkeyrunner -plugin

Note: This Question is unanswered, help us to find answer for this one

54. Which of the following is the general syntax of the "am instrument" command used in Android Studio?

Answer

Correct Answer: am instrument [f‌lags] l

Note: This Question is unanswered, help us to find answer for this one

55. Which of the following Android classes provides JUnit framework, Android-specif‌ic setup, teardown, and helper methods?

Answer

Correct Answer: AndroidTestCase

Note: This Question is unanswered, help us to find answer for this one

56. In Android Studio, which of the following commands is passed to the dumpsys tool so that it provides an output in logcat with performance information that is related to the frames of animation, which occur during the recording phase?

Answer

Correct Answer: gfxinfo

Note: This Question is unanswered, help us to find answer for this one

57. Which of the following is the correct syntax of the command that you will be running if you want to see how your app's memory is divided between different types of RAM allocation?

Answer

Correct Answer: adb shell dumpsys meminfo [-d]

Note: This Question is unanswered, help us to find answer for this one

58. Which of the following methods can be used to Check whether or not an element supports multi—selection?

Answer

Correct Answer: 3 assertFalse(make.isMultiple());

Note: This Question is unanswered, help us to find answer for this one

59. In Addroid Studio, which of the following is the correct syntax of the bmgr restore command used for immediately invoking the restore operation for an application whose testing is being done?

Answer

Correct Answer: adb Shell bmgr restore

Note: This Question is unanswered, help us to find answer for this one

60. Which of the following Selenium commands is used for returning the text from a specified cell in a table?

Answer

Correct Answer: storeTable

Note: This Question is unanswered, help us to find answer for this one

61.

While working on Android Studio, which of the following features are supported by the monkeyrunner tool in order to perform Android testing?

i) It supports functional testing.

ii) It supports regression testing.

iii) It supports only single device control.

iv) It supports extensible automation.


Answer

Correct Answer:

Only options, i, ii, and iv 


Note: This Question is unanswered, help us to find answer for this one

62. Which of the following is the default log level of selendroid?

Answer

Correct Answer: ERROR

Note: This Question is unanswered, help us to find answer for this one

63. Which of the following log messages should you select for displaying the expected log messages for regular usage and the message levels lower in the list?

Answer

Correct Answer: Info

Note: This Question is unanswered, help us to find answer for this one

64. Which of the following tools is used for stress-testing an Android application and reporting back the errors that come up?

Answer

Correct Answer: Ul/Application Exerciser Monkey

Note: This Question is unanswered, help us to find answer for this one

65. Which of the following folder locations can be used for layouts to accomodate different screen sizes? (choose all that apply.)

Answer

Correct Answer: res/layout/
res/layout-large/
res/layout-xlarge/

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

66. A menu resource file in Java can be referenced as (...)?

Answer

Correct Answer: R.menu.filename

Note: This Question is unanswered, help us to find answer for this one

67. To connect list view to array we can use:

Answer

Correct Answer: Arrayadapter

Note: This Question is unanswered, help us to find answer for this one

68. Which method sets the layout for the activity?

Answer

Correct Answer: setContentView()

Note: This Question is unanswered, help us to find answer for this one

69. Which object can be used to display a pop-up message?

Answer

Correct Answer: Dialogue
Toast
Popup

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

70. Which of the following is the correct location of the menu resource file?

Answer

Correct Answer: res/menu/filename.xml

Note: This Question is unanswered, help us to find answer for this one

71. Which of the following are true for intent?

Answer

Correct Answer: It’s a type message that allows you to bind separate objects (such as activation) together at runtime.
If one activity wants to start a second activity, it does it by sending an intnet to Android.
startActivity(intent); This tells Android to start the activity specified by the intent.

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

72. Which of the following is/are correct about Intent filter?

Answer

Correct Answer: An intent filter specifies what types of intent each component can receive.
Intent filters are defined inside AndroidManifest.xml
An intent filter also specifies a category
An intent filter must include a category of android.intent.category.DEFAULT, if it’s to receive explicit intents

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

73. Which of the following is true for R.java? (choose all that apply)

Answer

Correct Answer: R.java is a special Java file that gets generated by the Android tools whenever you create or build your app
Android uses R.java to keep track of the resources used within the app
It enables you to get references to GUI components from within your activity code

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

74. To run your app on a REAL device which of the following are required? Check all that apply.

Answer

Correct Answer: Enable USB debugging on Android device
Install USB driver for Windows or create udev rules file for Linux. No USB drivers needed for Mac
Plug Android device to your computer

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

75. Which of the following is correct in order to get a reference to the TextView having an id of "water"

Answer

Correct Answer: findViewById(R.id.water)

Note: This Question is unanswered, help us to find answer for this one

76. To pass extra information with intent we can use which Intent object method?

Answer

Correct Answer: putExtra()

Note: This Question is unanswered, help us to find answer for this one

77. ____ are like reusable components or subactivities and can be reused between screens.

Answer

Correct Answer: Fragments

Note: This Question is unanswered, help us to find answer for this one

78. Which of the following is not an activity lifecycle method?

Answer

Correct Answer: onDetach()

Note: This Question is unanswered, help us to find answer for this one

79. Which statement converts the Object into String?

Answer

Correct Answer: String.valueOf(Object)

Note: This Question is unanswered, help us to find answer for this one

80. Which of the following lifecycle methods are common to both Activity and Fragment?

Answer

Correct Answer: onCreate()
onStart()

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

81. One can declare a logical parent ".MainActivity" to < activity > by adding the following line in the respective < activity > in AndroidManifest.xml.

Answer

Correct Answer: android:parentActivityName=

Note: This Question is unanswered, help us to find answer for this one

82. Which of the following can you use to display a progress bar in an Android application?

Answer

Correct Answer: ProgressDialog
requestWindowFeature

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

83. 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?

Answer

Correct Answer: Screen2 can exist in any other Android application installed on the device.
Screen2 will always be launched asynchronously.
Screen2 can return a result code to Screen1 if launched with startSubActivity.

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

84.

Which of the following correctly adds a string array resource to strings.xml?

Answer

Correct Answer:

string_value1

string_value2

string_value3



Note: This Question is unanswered, help us to find answer for this one

85.

When publishing updates to an app on the Google Play Store, which of the following are true?

Answer

Correct Answer: The keystore used to sign the APK to publish the app must match previous published versions.
The package name must be the same.
The versionCode must be incremented or higher than the previous published version.

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

86.

If the intent has extra integer information passed to it with a name of "message", we can retrieve that information using which of the following?

Answer

Correct Answer: intent.getIntExtra("message");

Note: This Question is unanswered, help us to find answer for this one

87.

Buttons and text views both inherit from the same Android class named _____.

Answer

Correct Answer: android.view.View

Note: This Question is unanswered, help us to find answer for this one

88.

The best practice is to put string values in _________ file.

Answer

Correct Answer: strings.xml

Note: This Question is unanswered, help us to find answer for this one

89.

A layout can retrieve the value of the String named 'stringmessage' using `____`.

Answer

Correct Answer: @string/string_message

Note: This Question is unanswered, help us to find answer for this one

90.

The strings.xml has a _________ element, which contains one or more elements.

Answer

Correct Answer: <resources>

Note: This Question is unanswered, help us to find answer for this one

91.

AndroidMainfest.xml file contains the following essential information about your app: (choose all that apply)

Answer

Correct Answer: App icon
Theme affects
App activities
Required libraries

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

92.

Which statement correctly assigns the id to textView element in layout file?

Answer

Correct Answer: <TextView android:id="@+id/textView />

Note: This Question is unanswered, help us to find answer for this one

93.

Which file contains information about the app?

Answer

Correct Answer: AndroidManifest.xml

Note: This Question is unanswered, help us to find answer for this one

94.

The 'showAsAction' attribute of in a menu resource file can have which of the following values? Check all that apply.

Answer

Correct Answer: ifRoom
withText
never

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

95.

Which of the following data types does AIDL support?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

96.

What does the following code output? public class XYZ extends AsyncTask { @Override protected String doInBackground(String... params) { PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); final WakeLockwl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK |PowerManager.ACQUIRE_CAUSES_WAKEUP |PowerManager.ON_AFTER_RELEASE, ""); wl.acquire(); return "Executed"; } @Override protected void onPostExecute(String result) {} }

Answer

Correct Answer: Lock the screen

Note: This Question is unanswered, help us to find answer for this one

97.

What does mean by the following XML code?

AndroidManifest.xml

<application android:label=»@string/app_name» android:icon=»@drawable/icon»

android:name=»com.intel.starApp»> … ….

<meta-data android:name=»DATABASE» android:value=» example.db»>

<meta-data android:name=»VERSION» android:value=»2″>

<meta-data android:name=»QUERY_LOG» android:value=»true»>

</meta-data></meta-data></meta-data>

 

Answer

Correct Answer: Local SQLite DataBase file name is “example.db”, DBMS version 2.0, Logs selected queries

Note: This Question is unanswered, help us to find answer for this one

98.

How to show option menu using the following source on Samsung phone but cannot see it. How to fix it? try { ViewConfigurationconfig = ViewConfiguration.get(this); Field menuKeyField = ViewConfiguration.class .getDeclaredField("sHasPermanentMenuKey"); if (menuKeyField != null) { menuKeyField.setAccessible(true); menuKeyField.setBoolean(config, false); } } catch (Exception e) { e.printStackTrace(); }

Answer

Correct Answer: None of the above

Note: This Question is unanswered, help us to find answer for this one

99.

Which of the following ADT generates a debug certificate automatically for emulator and device?

Answer

Correct Answer: Key alias:”androiddebugkey”
Keystore name:”debug.keystore”
Keystore password:”android”
Key password:”android”

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

100.

Android Architecture is consisted of the following components?

Answer

Correct Answer: Linux Kernel
Libraries

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

101.

Which of the following are possible states of a process?

Answer

Correct Answer: Visible Activity
Background Activity
Empty Process

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

102.

Following methods called during the life cycle of an android activity are?

Answer

Correct Answer: onStart
onStop
onDestroy

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

103.

Which of the following common design patterns are used in Android?

Answer

Correct Answer: Model View Controller
Model View View Model

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

104.

What is the output if following code executed? final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); final List pkgAppsList = getPackageManager().queryIntentActivities(mainIntent, 0); for (Object object : pkgAppsList) { ResolveInfo info = (ResolveInfo) object; File file = new File(info.activityInfo.applicationInfo.publicSourceDir); // … }

Answer

Correct Answer: Get list of installed applications and get public source directory for each app

Note: This Question is unanswered, help us to find answer for this one

105.

If you are going to check a network connection with the below source code, what would be required to make it work? public boolean isOnline() { ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo netInfo = cm.getActiveNetworkInfo(); if (netInfo != null && netInfo.isConnectedOrConnecting()) return true; return false; }

Answer

Correct Answer: android.permission.ACCESS_NETWORK_STATE

Note: This Question is unanswered, help us to find answer for this one

106.

After building an Android project with Android Studio, what is the purpose of generating R.java as follows?  package com.intelstar.venus; public final class R {      public static final class attr {      }      public static final class drawable {          public static final int icon=0x7f020000;      }      public static final class layout {          public static final int main=0x7f030000;      }      public static final class string {          public static final int app_name=0x7f040000;      } }

Answer

Correct Answer: R class is used for the linking of the resource into the source code

Note: This Question is unanswered, help us to find answer for this one

107.

What is the output if following code executed? public int pxToDp(int px) { DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics(); int dp = Math.round(px / (displayMetrics.xdpi / DisplayMetrics.DENSITY_DEFAULT)); return dp; } public int dpToPx(int dp) { DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics(); int px = Math.round(dp * (displayMetrics.xdpi / DisplayMetrics.DENSITY_DEFAULT)); return px; }

Answer

Correct Answer: pxToDp() converts pixel into screen size value, and dpToPx() works via versa

Note: This Question is unanswered, help us to find answer for this one

108.

What is the output if following code executed? Values/google_maps_api.xml google_maps_key (key from https://console.developers.google.com/) AndroidManifest.xml <meta-data android:name="com.google.android.geo.API_KEY" android:value="@string/google_maps_key" /> Build.gradle(Module: app) Dependencies{ … Compile ‘com.google.android.gms:play-services:8.4.0’ }

Answer

Correct Answer: Supports Google Map API environment for the geolocation and map related app

Note: This Question is unanswered, help us to find answer for this one

109.

What does the following code do? Calendar cal = Calendar.getInstance(); DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); cal.add(Calendar.DATE, -1); return dateFormat.format(cal.getTime());

Answer

Correct Answer: Get yesterday date and returns its formatted string

Note: This Question is unanswered, help us to find answer for this one

110.

An Intent object is a bundle of information and what are the object contains?

Answer

Correct Answer: D) A and C

Note: This Question is unanswered, help us to find answer for this one

111.

What does A() function do? private void A() { B(getActivity(), "com.app.package.here"); } public void B(Context context, String packageN) { Intent i = context.getPackageManager().getLaunchIntentForPackage(packageN); if (i == null) { i.addCategory(Intent.CATEGORY_LAUNCHER); context.startActivity(i); } else { try { context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + packageN))); } catch (android.content.ActivityNotFoundException anfe) { context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + packageN))); } } }

Answer

Correct Answer: Launch other app named as “com.app.package.here”

Note: This Question is unanswered, help us to find answer for this one

112.

When creating main Android App project with Android studio, how can we support localization of the Android App?

Answer

Correct Answer: main/res/values/strings.xml

Note: This Question is unanswered, help us to find answer for this one

113.

The setData() method specifies data only as a ____ , setType() specifies it only as a MIME type, and setDataAndType() specifies it as both a URI and a MIME type. The URI is read by getData() and the type by getType()?

Answer

Correct Answer: URI

Note: This Question is unanswered, help us to find answer for this one

114.

Technically you can use Eclipse with versions 5 and newer. However, the latest version of Eclipse was only tested on the __ JRE ?

Answer

Correct Answer: Java 5

Note: This Question is unanswered, help us to find answer for this one

115.

What does the following code? public void launchScreen(Activity activity) { Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_HOME); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); activity.startActivity(intent); }

Answer

Correct Answer: Open Home screen

Note: This Question is unanswered, help us to find answer for this one

116.

Which of the following are key components under the Android application Architecture?

Answer

Correct Answer: resource externalization
notifications
content providers

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

117.

The addCategory() method places a category in an Intent object, ____ deletes a category previously added, and ____ gets the set of all categories currently in the object?

Answer

Correct Answer: removeCategory()
getCategories()

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

118.

Following Android Classes will uses Design Patterns?

Answer

Correct Answer: View Holder uses Singleton Design Pattern
Adapter uses Adapter Design Pattern
Broadcast Receiver uses Observer Design Pattern

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

119.

By default, ArrayAdapter creates a view for each array item by calling toString() on each item and placing the contents in?

Answer

Correct Answer: TextView

Note: This Question is unanswered, help us to find answer for this one

120.

A service has lifecycle callback methods that you can implement to __ changes in the service's state and you can perform work at the appropriate stage?

Answer

Correct Answer: monitor

Note: This Question is unanswered, help us to find answer for this one

121.

What is Robolectric?

Answer

Correct Answer: An Android unit testing framework.

Note: This Question is unanswered, help us to find answer for this one

122.

Which of these table element does not exists?

Answer

Correct Answer: <tcol>

Note: This Question is unanswered, help us to find answer for this one

123.

What is Google Cloud Messaging?

Answer

Correct Answer: A service that can be used to send messages to Android devices using Google's cloud platform.

Note: This Question is unanswered, help us to find answer for this one

124.

With regard to graphics, what is the “dirty rect”?

Answer

Correct Answer: An object that is passed as an argument to the invalidate() method to denote the portion of screen that should be redrawn.

Note: This Question is unanswered, help us to find answer for this one

125.

What is the purpose of the Systrace tool?

Answer

Correct Answer: It analyzes the execution of an application and places operations into a system-wide context on a common, visual timeline.

Note: This Question is unanswered, help us to find answer for this one

126.

Which exception is thrown when an image exceeds the maximum allocated size in memory?

Answer

Correct Answer: OutOfMemoryException

Note: This Question is unanswered, help us to find answer for this one

127.

What is Robotium?

Answer

Correct Answer: An Android test automation framework.

Note: This Question is unanswered, help us to find answer for this one

128.

Which of the following enables you to use Java 8 features when building apps for Android?

Answer

Correct Answer: retrolambda

Note: This Question is unanswered, help us to find answer for this one

129.

What is an Intent Filter?

Answer

Correct Answer: Provides the OS with the data types that an application can receive from an Intent triggered elsewhere.

Note: This Question is unanswered, help us to find answer for this one

130.

What is the primary purpose of an Intent?

Answer

Correct Answer: Used in order to send a command or data to another Application.

Note: This Question is unanswered, help us to find answer for this one

131.

Which of the following is true when an Android device is rotated?

Answer

Correct Answer: The Activity is destroyed and recreated.

Note: This Question is unanswered, help us to find answer for this one

132.

Within the context of Android resource definitions, what do 'sw600' and 'w800' mean?

Answer

Correct Answer: sw600 resources are referenced when the screen width exceeds 600dp in width, w800 resources are referenced when the screen width is exactly 800dp.

Note: This Question is unanswered, help us to find answer for this one

133.

How could using Guava in an Android application cause problems at build time in particular?

Answer

Correct Answer: The libraries are large and can cause the compiler to exceed the 65k method limit imposed by Java 7 and below.

Note: This Question is unanswered, help us to find answer for this one

134.

Which of the following is the correct way to request permission to allow an app feature to access the internet?

Answer

Correct Answer: <uses-permission android:name="android.permission.INTERNET"/>

Note: This Question is unanswered, help us to find answer for this one

135.

Which of the following is a tool used for profiling the performance of Android apps?

Answer

Correct Answer: Traceview

Note: This Question is unanswered, help us to find answer for this one

136.

What is Guava?

Answer

Correct Answer: An open-source project consisting of common libraries for Java, maintained and primarily developed by Google.

Note: This Question is unanswered, help us to find answer for this one

137.

In the context of Android development tools, what does DDMS stand for?

Answer

Correct Answer: Dalvik Debug Monitor Server

Note: This Question is unanswered, help us to find answer for this one

138.

What is Lint?

Answer

Correct Answer: A static code analysis tool that checks code for bugs, optimisation opportunities, common coding errors and other patterns indicating that the code could be improved.

Note: This Question is unanswered, help us to find answer for this one

139.

What are the two types of Intent in Android?

Answer

Correct Answer: Implicit and Explicit

Note: This Question is unanswered, help us to find answer for this one

140.

Which of the following FragmentTransaction methods allow the transaction to occur after the parent Activity’s state has been saved?

Answer

Correct Answer: commitAllowingStateLoss()

Note: This Question is unanswered, help us to find answer for this one

141.

If required during the build process, where should sensitive information such as API Keys, keystore passwords and VCS login details be kept when using Android Studio?

Answer

Correct Answer: In a configuration file outside of version control, such as gradle.properties.

Note: This Question is unanswered, help us to find answer for this one

142.

What is the purpose of Volley?

Answer

Correct Answer: A convenience library that makes network calls easier and faster.

Note: This Question is unanswered, help us to find answer for this one

143.

Which feature of the Java build process allows for Android projects with more than 65k method calls?

Answer

Correct Answer: Multidexing

Note: This Question is unanswered, help us to find answer for this one

144.

With regard to Android Wear, what is Ambient Mode?

Answer

Correct Answer: The dimmed or reduced detail display state which some devices enter when they are not being actively interacted with by the user.

Note: This Question is unanswered, help us to find answer for this one

145.

Which of the following statements are true with regard to an AsyncTask class.

Answer

Correct Answer: AsyncTasks are executed serially on a single background thread on all versions of Android.

Note: This Question is unanswered, help us to find answer for this one

146.

What is the difference between a Broadcast Receiver and an Intent Filter?

Answer

Correct Answer: A Broadcast Receiver allows an app to register to be notified upon system or application events, an Intent Filter specifies which Intents an app can receive.

Note: This Question is unanswered, help us to find answer for this one

147.

What is a WakeLock?

Answer

Correct Answer: A feature of the PowerManager that indicates to the system that your app requires the device to stay on.

Note: This Question is unanswered, help us to find answer for this one

148.

Which of the following will cause a Force Close event?

Answer

Correct Answer: An unhandled null pointer exception.
An unhandled invalid parser exception.

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

149.

In which situation is it acceptable to make network calls on the UI thread?

Answer

Correct Answer: Where asynchronous data calls are required.

Note: This Question is unanswered, help us to find answer for this one

150.

When defining a View within an XML layout, which two attributes are always required?

Answer

Correct Answer: Width and Height

Note: This Question is unanswered, help us to find answer for this one

151.

What does ANR stand for?

Answer

Correct Answer: Application Not Responding

Note: This Question is unanswered, help us to find answer for this one

152.

What is the largest size of a texture that can be loaded within an Android application?

Answer

Correct Answer: The value is hardware-dependent, so should be referenced by calling Canvas.getMaximumBitmapWidth()/Canvas.getMaximumBitmapHeight() post ICS, and GL_MAX_TEXTURE_SIZE directly in previous releases.

Note: This Question is unanswered, help us to find answer for this one

153.

What must be done after a TypedArray is no longer needed?

Answer

Correct Answer: The recycle() method must be manually called in order to notify the system that the object is no longer using the memory allocated to it.

Note: This Question is unanswered, help us to find answer for this one

154.

What is a RemoteView for?

Answer

Correct Answer: It defines a view hierarchy that can be displayed in another process, such as a rich notification layout or home screen widget.

Note: This Question is unanswered, help us to find answer for this one

155.

What was Project Butter?

Answer

Correct Answer: An AOSP initiative aimed at making APIs easier to understand by new developers, on order to reduce the instability found in some poorly designed apps.

Note: This Question is unanswered, help us to find answer for this one

156.

What are the Android Support Libraries for?

Answer

Correct Answer: They allow features introduced in more recent versions of Android to be used on devices running older OS versions.

Note: This Question is unanswered, help us to find answer for this one

157.

What is Retrofit?

Answer

Correct Answer: A type-safe client for consuming RESTful APIs in Android and Java in general.

Note: This Question is unanswered, help us to find answer for this one

158.

What does a strikethrough formatting indicate in Android Studio?

Answer

Correct Answer: That the method or class in use has been newly introduced in the current version of the build tools in use.

Note: This Question is unanswered, help us to find answer for this one

159.

Where should layouts be defined wherever possible?

Answer

Correct Answer: In XML

Note: This Question is unanswered, help us to find answer for this one

160.

What is a Master Detail pattern?

Answer

Correct Answer: A layout pattern consisting of a Master layout (containing a collection of data) and Detail (containing detailed information about an item from the collection).

Note: This Question is unanswered, help us to find answer for this one

161.

When does ANR occur?

Answer

Correct Answer: When there has been no response to user input event within 5 seconds.

Note: This Question is unanswered, help us to find answer for this one

162.

What is the purpose of the AppCompat library?

Answer

Correct Answer: It allows the ActionBar UI pattern to be used on older versions of Android.

Note: This Question is unanswered, help us to find answer for this one

163.

The default action resultant when pressing the device back button is to pop the backstack. What is the backstack?

Answer

Correct Answer: A stack data structure containing every activity in the order that they were opened. The pop action removes the most recently opened activity.

Note: This Question is unanswered, help us to find answer for this one

164.

Which of the following is considered best practice according to Google’s Android Development documentation?

Answer

Correct Answer: Use Fragments whenever possible, Activities should only be used where a FragmentManager and Fragments cannot do the job required.

Note: This Question is unanswered, help us to find answer for this one

165.

What feature of the Google Play Store allows developers to release pre-production builds to testers?

Answer

Correct Answer: Google Play Alpha and Beta deployment channels.

Note: This Question is unanswered, help us to find answer for this one

166.

Which is the correct file in which you should request permissions that an app will use?

Answer

Correct Answer: In AndroidManifest.xml.

Note: This Question is unanswered, help us to find answer for this one

167.

In the context of the Android OS, what is the GC?

Answer

Correct Answer: Part of the Dalvik VM that is responsible for clearing and reallocating unused memory when it is no longer required or when higher priority services or applications require it.

Note: This Question is unanswered, help us to find answer for this one

168.

How many expansion files can an APK file have? Select all correct options.

Answer

Correct Answer: one
two

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

169.

Which of the following is not Content Provider?

Answer

Correct Answer: Shared Preferences

Note: This Question is unanswered, help us to find answer for this one

170.

Which of the following statements is not correct with regards to using Content Providers?

Answer

Correct Answer: using an SQLite database if the use is entirely within on application.

Note: This Question is unanswered, help us to find answer for this one

171.

Which of the following classes does not relate to other? SQLiteOpenHelper, SQLiteDatabase, Cursor, ContentProvider

Answer

Correct Answer: Cursor

Note: This Question is unanswered, help us to find answer for this one

172.

Which of the following programming languages can be used to develop software applications for the Android platform?

 

Answer

Correct Answer: Java

Note: This Question is unanswered, help us to find answer for this one

173.

Which of the following are true about PhoneStateIntentReceiver.notifyPhoneCallState?

Answer

Correct Answer: notifyPhoneCallState has to be called if your application wishes to receive a notification about an incoming phone call.

Note: This Question is unanswered, help us to find answer for this one

174.

Which of the following is/are appropriate for saving the state of an Android application?

Answer

Correct Answer: Activity.onFreeze()

Note: This Question is unanswered, help us to find answer for this one

175.

Which of the following is correct to use for data transfer regularly and efficiently, but not instantaneously?

Answer

Correct Answer: Sync adapters

Note: This Question is unanswered, help us to find answer for this one

176.

Fill in the blank:

___________ makes appropriate list of application data for the other applications.

Answer

Correct Answer: content provider

Note: This Question is unanswered, help us to find answer for this one

177.

Which of the following tools can be used to reduce apk package size?

Answer

Correct Answer: ProGuard

Note: This Question is unanswered, help us to find answer for this one

178.

What is the maximum supported size for a single expansion file in the Google Play Store?

Answer

Correct Answer: 2GB

Note: This Question is unanswered, help us to find answer for this one

179.

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)?

Answer

Correct Answer: android:versionCode

Note: This Question is unanswered, help us to find answer for this one

180.

Fill in the blank:

Once an app is published, the ________ cannot be changed. It should be unique for each APK.

Answer

Correct Answer: package name

Note: This Question is unanswered, help us to find answer for this one

181.

What is the maximum supported file size for a single APK file (excluding expansion packages) in the Google Play Store?

Answer

Correct Answer: 50MB

Note: This Question is unanswered, help us to find answer for this one

182.

Which of the following procedures will get the package name of an APK file?

Answer

Correct Answer: Programmatically, using PackageManager in an installed Android app.

Note: This Question is unanswered, help us to find answer for this one

183.

What is correct regarding GCM - Google Cloud Messaging service?

Answer

Correct Answer: It does device to server communication and vice versa.

Note: This Question is unanswered, help us to find answer for this one

184.

Which of the following functions will return all available Content Providers?

Answer

Correct Answer: 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;

Note: This Question is unanswered, help us to find answer for this one

185.

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?

Answer

Correct Answer: 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" />

Note: This Question is unanswered, help us to find answer for this one

186.

Which of the following statements are correct with regards to publishing updates of apps on Google Play?

Answer

Correct Answer: The android:versionCode attribute in the manifest file must be incremented and the APK file must be signed with the same private key.

Note: This Question is unanswered, help us to find answer for this one

187.

Which of the following statement is correct regarding StrictMode?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

188.

Consider the XML fragment below, which is taken from one of the files in an Android project:

        android:layout_width = "fill_parent"

        android:layout_height = "fill_parent"

        android:text = "Some Text">

Which of the following are true about the XML fragment above?

Answer

Correct Answer: It is taken from an XML file used to define a view.
If this is not the outer most tag in the XML file then it need not contain the xmlns: attribute.
MyElement should be the name of a class derived, directly or indirectly, from the View class.

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

189.

Which of the following classes is not used in working with database?

Answer

Correct Answer: DatabaseHelper

Note: This Question is unanswered, help us to find answer for this one

190.

Which of the following are valid ways to deploy an Android application to a device?

Answer

Correct Answer: All of these.

Note: This Question is unanswered, help us to find answer for this one

191.

Which of the following 4 classes does not relate to others?

   ApplicationInfo, SyncInfo, ActivityInfo, PackageInfo

Answer

Correct Answer: SyncInfo

Note: This Question is unanswered, help us to find answer for this one

192.

Which of the following protocols are provided by Google for GCM Connection Servers?

A) HTTP

B) XMPP

C) SOAP

D) RMI

Answer

Correct Answer: A and B

Note: This Question is unanswered, help us to find answer for this one

193.

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

Answer

Correct Answer: Statement B is true, while Statement A is false.

Note: This Question is unanswered, help us to find answer for this one

194.

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 period of time to wait between runs, or by running it at certain times of the day, or both.

Answer

Correct Answer: Both statements are false.

Note: This Question is unanswered, help us to find answer for this one

195.

What does the following code do?

   public boolean isOnline() {

   ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);

   NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();

   return (networkInfo != null && networkInfo.isConnected());

}

Answer

Correct Answer: checking Network connection.

Note: This Question is unanswered, help us to find answer for this one

196.

What is the advantage of using AsyncTaskLoader instead of AsyncTask?

Answer

Correct Answer: less work with the configuration of application

Note: This Question is unanswered, help us to find answer for this one

197.

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 instance of a concrete content provider.

Answer

Correct Answer: ContentResolver

Note: This Question is unanswered, help us to find answer for this one

198.

Consider the following snippet of code:

   @Override

protected void onStop

{

Super.onStop();

SharedPreferences setting = getSharedPreferences("MyPrefs", 0);

SharedPreferences.Editor editor = settings.edit();

editor.putBoolean("MyBool", true);

 

<some more code here>

}

   Which of the following should be used <some more code here>?

Answer

Correct Answer: editor.commit();

Note: This Question is unanswered, help us to find answer for this one

199.

Which of the following permissons is needed to perform the network operations through internet?

a) INTERNET

b) ACCESS_NETWORK_STATE

Answer

Correct Answer: a

Note: This Question is unanswered, help us to find answer for this one

200.

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) android.permission.GET_ACCOUNTS

D) android.permission.WAKE_LOCK

E) applicationPackage + ".permission.C2D_MESSAGE"

F) A receiver for com.google.android.c2dm.intent.RECEIVE, with the category set as applicationPackage. The receiver should require the com.google.android.c2dm.SEND permission

Answer

Correct Answer: all of these

Note: This Question is unanswered, help us to find answer for this one

201.

Which of the following formats is not supported in Android?

Answer

Correct Answer: AVI

Note: This Question is unanswered, help us to find answer for this one

202.

Which of the following sensors is only hardware-based?

Answer

Correct Answer: accelerometer sensor

Note: This Question is unanswered, help us to find answer for this one

203.

What is the correct way to restrict app visibility on Google Play to devices that have a camera?

Answer

Correct Answer: <uses-feature android:name="android.hardware.camera" android:required="true" />

Note: This Question is unanswered, help us to find answer for this one

204.

What is the best way of opening camera as sub-activity?

Answer

Correct Answer: Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(getPackageManager()) != null) { startActivityForResult(takePictureIntent, 1); }

Note: This Question is unanswered, help us to find answer for this one

205.

Which of the following widgets helps to embed images in activities?

Answer

Correct Answer: both of above

Note: This Question is unanswered, help us to find answer for this one

206.

Using a content provider, which of the following operations are able to perform?

a) create

b) read

c) update

d) delete

Answer

Correct Answer: b, c and d

Note: This Question is unanswered, help us to find answer for this one

207.

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 (IOException e) {

    System.out.println("IOException");

} catch (UserRecoverableAuthException e) {

    System.out.println("UserRecoverableAuthException");

} catch (GoogleAuthException e) {

    System.out.println("GoogleAuthException");

}

Answer

Correct Answer: prints GoogleAuthException

Note: This Question is unanswered, help us to find answer for this one

208.

What does the following code do?

 

SensorManager mgr = (SensorManager) getSystemService(SENSOR_SERVICE);

List<Sensor> sensors = mgr.getSensorList(Sensor.TYPE_ALL);

for (Sensor sensor : sensors) {

        System.out.println(""+sensor.getName());

}

Answer

Correct Answer: prints names of all available sensors in device

Note: This Question is unanswered, help us to find answer for this one

209.

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 debug key that is created by the Android SDK build tools can be used.

Answer

Correct Answer: all statements are true

Note: This Question is unanswered, help us to find answer for this one

210.

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?

Answer

Correct Answer: onInit

Note: This Question is unanswered, help us to find answer for this one

211.

Which of the following are UI elements that you can use in a window in an Android application?

Answer

Correct Answer: TextView
EditText

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

212.

Which of the following can you use to add items to the screen menu?

Answer

Correct Answer: Activity.onCreateOptionsMenu
Activity.onPrepareOptionsMenu

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

213.

What is Android?

Answer

Correct Answer: A software stack for mobile devices that includes an operating system, middleware and key applications.

Note: This Question is unanswered, help us to find answer for this one

214.

What is the interface Spannable used for?

Answer

Correct Answer: This is the interface for text to which markup objects can be attached and detached.

Note: This Question is unanswered, help us to find answer for this one

215.

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?

Answer

Correct Answer: Call setContentView(mView) in the onCreate() of the main application class.

Note: This Question is unanswered, help us to find answer for this one

216.

What is "Android-dx"?

Answer

Correct Answer: A tool to generate Android byte code from .class files.

Note: This Question is unanswered, help us to find answer for this one

217.

What is "Android-activityCreator"?

Answer

Correct Answer: A command line tool to create Android project files.

Note: This Question is unanswered, help us to find answer for this one

218.

Which of the following can be used to navigate between screens of different Android applications?

Answer

Correct Answer: Intent

Note: This Question is unanswered, help us to find answer for this one

219.

Which of the following can you use to display an HTML web page in an Android application?

Answer

Correct Answer: WebView

Note: This Question is unanswered, help us to find answer for this one

220.

Which of the following Integrated Development Environments can be used for developing software applications for the Android platform?

Answer

Correct Answer: Eclipse

Note: This Question is unanswered, help us to find answer for this one

221.

Which of the following are life-cycle methods of an Activity that can be implemented to perform various operations during the lifetime of an Activity?

Answer

Correct Answer: onCreate
onCompleteThaw
onRestart
onPause

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

222.

Which of the following is the parent class for the main application class in an Android application that has a user interface?

Answer

Correct Answer: Activity

Note: This Question is unanswered, help us to find answer for this one

223.

What is the purpose of the ContentProvider class?

Answer

Correct Answer: To share data between Android applications.

Note: This Question is unanswered, help us to find answer for this one

224.

Which of the following can be used to bind data from an SQL database to a ListView in an Android application?

Answer

Correct Answer: SimpleCursorAdapter

Note: This Question is unanswered, help us to find answer for this one

225. Which method is called first when an Activity is started?


Answer

Correct Answer: Both a and b

Note: This Question is unanswered, help us to find answer for this one

226. Which manifest uses-configuration should you use if your application requires a finger activated touch screen on the device?

Answer

Correct Answer: <uses-configuration android:reqTouchScreen="finger" /> must be in your manifest

Note: This Question is unanswered, help us to find answer for this one

227. C2DM was deprecated and replaced by:

Answer

Correct Answer: GCM.

Note: This Question is unanswered, help us to find answer for this one

228. Which method from Activity is used to update the UI ?

Answer

Correct Answer: runOnUIThread()

Note: This Question is unanswered, help us to find answer for this one

229. Where should you specify which activity should launch first in your app?

Answer

Correct Answer: Manifest file

Note: This Question is unanswered, help us to find answer for this one

230. Which function is used to send value from one activity to another?

Answer

Correct Answer: intent.putextra()

Note: This Question is unanswered, help us to find answer for this one

231. What is the attribute of EditText called that displays a text that goes away once you write something?

Answer

Correct Answer: hint

Note: This Question is unanswered, help us to find answer for this one

232. Which of the following is a layout that organizes its children into a horizontal or vertical stack?

Answer

Correct Answer: LinearLayout

Note: This Question is unanswered, help us to find answer for this one

233. What is the key used for a bundle extra parameter on a PendingIntent holding a location?

Answer

Correct Answer: public static final String KEY_LOCATION_CHANGED

Note: This Question is unanswered, help us to find answer for this one

234. What is the maximum size of an Android app?

Answer

Correct Answer: 4 gb

Note: This Question is unanswered, help us to find answer for this one

235. Which of the following is not a valid stage in an Activity's lifecycle?

Answer

Correct Answer: onFinish

Note: This Question is unanswered, help us to find answer for this one

236. In which resource folder should we create an animation file?

Answer

Correct Answer: anim

Note: This Question is unanswered, help us to find answer for this one

237. What is the message content for Discount: %1$d € String message = context.getString(R.string.discount, 10); ?

Answer

Correct Answer: Discount: 10 €

Note: This Question is unanswered, help us to find answer for this one

238. Which is the descriptive file that presents essential information about your app to the Android system?

Answer

Correct Answer: AndroidManifest.xml

Note: This Question is unanswered, help us to find answer for this one

239. What should you do in order to get paired Bluetooth device list?

Answer

Correct Answer: Add <user-permission android:name="android.permission.BLUETOOTH_ADMIN" /> permission to the manifest.xml

Note: This Question is unanswered, help us to find answer for this one

240. Which class should you extend when using/creating a database?

Answer

Correct Answer: SQLiteOpenHelper

Note: This Question is unanswered, help us to find answer for this one

241. Which package encompasses the interactive UI components of Android such as buttons and text fields?

Answer

Correct Answer: android.widget

Note: This Question is unanswered, help us to find answer for this one

242. Which tool of Android sdk allows installing applications, viewing logs and pooling files from Android device?

Answer

Correct Answer: adb

Note: This Question is unanswered, help us to find answer for this one

243. Which is the build system recommended by Google?

Answer

Correct Answer: gradle

Note: This Question is unanswered, help us to find answer for this one

244. How do you request permission for your application?

Answer

Correct Answer: <uses-permission> in the Android Manifest

Note: This Question is unanswered, help us to find answer for this one

245. What should you specify if your application needs to access information about the device's wi-fi networks?

Answer

Correct Answer: .

Note: This Question is unanswered, help us to find answer for this one

246. Which is a benefit of deodexing?

Answer

Correct Answer: Custom themes

Note: This Question is unanswered, help us to find answer for this one

247. What should you do if you want access list of paired Bluetooth devices on Android?

Answer

Correct Answer: add <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> to the manifest.xml

Note: This Question is unanswered, help us to find answer for this one

248. What is the default behavior of an Activity when you manually rotate the device screen?

Answer

Correct Answer: The activity is destroyed and reloaded entirely

Note: This Question is unanswered, help us to find answer for this one

249. Which theme's attribute changes the color of the status bar in Lollipop?

Answer

Correct Answer: android:colorPrimaryDark

Note: This Question is unanswered, help us to find answer for this one

250. Which method should be used to refresh the ActionBar if you use ActionBarCompat library?

Answer

Correct Answer: invalidateOptionsMenu()

Note: This Question is unanswered, help us to find answer for this one

251. Which method is called to notify a Fragment is visible when they are inside a ViewPager?

Answer

Correct Answer: setUserVisibleHint(boolean isVisibleToUser)

Note: This Question is unanswered, help us to find answer for this one

252. What class does Android use to communicate a request for an action to be performed?

Answer

Correct Answer: Intent

Note: This Question is unanswered, help us to find answer for this one

253. Why is a Parcelable used?

Answer

Correct Answer: To transmit structured objects between activities or fragments

Note: This Question is unanswered, help us to find answer for this one

254. Which externalizing resources are needed for application development?

Answer

Correct Answer: All of these

Note: This Question is unanswered, help us to find answer for this one

255. Which event listener is used when an Android device has changed orientation?

Answer

Correct Answer: OrientationEventListener

Note: This Question is unanswered, help us to find answer for this one

256. How can Android applications "borrow" functionality from other applications?

Answer

Correct Answer: Intent objects

Note: This Question is unanswered, help us to find answer for this one

257. Which API should you use to bring the data over to the device asynchronously if you have a fragment which displays a ListViewContaining query results?

Answer

Correct Answer: android.app.LoaderManager

Note: This Question is unanswered, help us to find answer for this one

258. Which of these Activity lifecycle events is when the activity is about to become visible to the user from a hidden state?

Answer

Correct Answer: onStart()

Note: This Question is unanswered, help us to find answer for this one

259. Which is the name of component used to display web pages in the application?

Answer

Correct Answer: WebView

Note: This Question is unanswered, help us to find answer for this one

260. Which of the following is the correct way to get pass string in an Intent, where key and value are both string variables?

Answer

Correct Answer: intent.putExtra(key,value);

Note: This Question is unanswered, help us to find answer for this one

261. Which extension does the Android Manifest file have?

Answer

Correct Answer: .xml

Note: This Question is unanswered, help us to find answer for this one

262. Which folder should the App Icon be kept under?

Answer

Correct Answer: res

Note: This Question is unanswered, help us to find answer for this one

263. What version(s) will you NOT be able to run the app if you set min sdk version to be 8 for an app?

Answer

Correct Answer: 7

Note: This Question is unanswered, help us to find answer for this one

264. What should dimensions be specified in so that layouts adapt to any screen size?

Answer

Correct Answer: Density-independent pixels

Note: This Question is unanswered, help us to find answer for this one

265. Which of the following defines your Android application components?

Answer

Correct Answer: AndroidManifest.xml file

Note: This Question is unanswered, help us to find answer for this one

266. Which of the following is Android's main programming language ?

Answer

Correct Answer: Java

Note: This Question is unanswered, help us to find answer for this one

267. Can the ActionBarCompat library propose ActionBar features for old phones?

Answer

Correct Answer: Yes, it can support devices from level api 2.1

Note: This Question is unanswered, help us to find answer for this one

268. Which of the following system services does Android rely on for the Linux kernel?

Answer

Correct Answer: Both security and network stack

Note: This Question is unanswered, help us to find answer for this one

269. Which type of file are Android layouts read from?

Answer

Correct Answer: xml

Note: This Question is unanswered, help us to find answer for this one

270. What is the latest layout proposed by the android sdk?

Answer

Correct Answer: DrawerLayout

Note: This Question is unanswered, help us to find answer for this one

271. Which method can get the context tied to the lifecycle of the entire application ?

Answer

Correct Answer: Activity.getApplicationContext()

Note: This Question is unanswered, help us to find answer for this one

272. Is it possible to update this textView as follows ? new Thread(new Runnable() { @Override public void run() { textView.setText("Hello World"); } }).start();

Answer

Correct Answer: No, because system throws a Fatal Exception: "Only the original thread that created a view hierarchy can touch its views"

Note: This Question is unanswered, help us to find answer for this one

273. What is the codename of the latest Android platform?

Answer

Correct Answer: Lollipop

Note: This Question is unanswered, help us to find answer for this one

274. Which component does not exist in the android sdk ?

Answer

Correct Answer: CheckBoxButton

Note: This Question is unanswered, help us to find answer for this one

275. According to the Activity's lifecycle, how is named the first method callback of an Activity?

Answer

Correct Answer: protected void onCreate(Bundle savedInstanceState);

Note: This Question is unanswered, help us to find answer for this one

276. Where is navigation drawer support available?

Answer

Correct Answer: Android Support Library v7

Note: This Question is unanswered, help us to find answer for this one

277. What will be the result of this intent? Intent intent = new Intent(A.this, B.class); startActivityForResult(intent , -1);

Answer

Correct Answer: call startActivity() from Activity A

Note: This Question is unanswered, help us to find answer for this one

278. What is an Intent ?

Answer

Correct Answer: a message

Note: This Question is unanswered, help us to find answer for this one

279. Which of these run in a separate thread?

Answer

Correct Answer: IntentService

Note: This Question is unanswered, help us to find answer for this one

280. Which method can be called to destroy an activity?

Answer

Correct Answer: finish()

Note: This Question is unanswered, help us to find answer for this one

281. What is the correct argument passed in the Array.sort() function

Answer

Correct Answer: CASE_INSENSITIVE_ORDER

Note: This Question is unanswered, help us to find answer for this one

282. how can you check if your activity is first on stack ?

Answer

Correct Answer: activity.isTaskRoot()

Note: This Question is unanswered, help us to find answer for this one

283. Which of the following is an Android class for the playback of sound?

Answer

Correct Answer: SoundPool

Note: This Question is unanswered, help us to find answer for this one

284. Which class MediaPlayer extends in android?

Answer

Correct Answer: Object

Note: This Question is unanswered, help us to find answer for this one

285. AppWidgetProvider is a subclass of

Answer

Correct Answer: BroadcastReceiver

Note: This Question is unanswered, help us to find answer for this one

286. How do you display the Action Bar back button on all Android versions?

Answer

Correct Answer: getSupportActionBar().setDisplayHomeAsUpEnabled(true);

Note: This Question is unanswered, help us to find answer for this one

287. You can control process usage in your Android application by...

Answer

Correct Answer: using the android:process attribute on the specific component defined in the manifest.

Note: This Question is unanswered, help us to find answer for this one

288. What permission is required for your application to use the device's vibrate hardware?

Answer

Correct Answer: android.permission.VIBRATE

Note: This Question is unanswered, help us to find answer for this one

289. Android has more users than IOS as at 20th February 2007

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

290. Hardcoding string values in xml speeds up android execution.

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

291. Which service is used to perform IPC, when bind application to a service?

Answer

Correct Answer: bindService()

Note: This Question is unanswered, help us to find answer for this one

292. How do you enable hardware acceleration in android?

Answer

Correct Answer: android:hardwareAccelerated="true"

Note: This Question is unanswered, help us to find answer for this one

293. Which of the following is a public constructor for canvas?

Answer

Correct Answer: canvas(Bitmap bitmap)

Note: This Question is unanswered, help us to find answer for this one

294. Which of the following is NOT a subclass of TextView?

Answer

Correct Answer: Image Button

Note: This Question is unanswered, help us to find answer for this one

295. if you want to access list of paired Bluetooth devices on Android, what should you do ?

Answer

Correct Answer: add to the manifest.xml

Note: This Question is unanswered, help us to find answer for this one

296. What should you extend in case you need to apply a portion of code to your entire application?

Answer

Correct Answer: Application(import both android.app.Activity and anroid.app.Application)

Note: This Question is unanswered, help us to find answer for this one

297. In order to get paired Bluetooth device list you need to :

Answer

Correct Answer: add <user-permission android:name="android.permission.BLUETOOTH_ADMIN" /> permission to the manifest.xml

Note: This Question is unanswered, help us to find answer for this one

298. Android applications can "borrow" functionality from other applications by using...

Answer

Correct Answer: intent objects

Note: This Question is unanswered, help us to find answer for this one

299. True or false? Fragments are independent from Activities.

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

300. How can you assign a custom (NOT BUILT IN ANDROID) font typeface to a TextView?

Answer

Correct Answer: In code: mTextViem.setTypeface(Typeface myfont);

Note: This Question is unanswered, help us to find answer for this one

301. How do you get an intent data inside a fragment basically?

Answer

Correct Answer: Bundle args = getActivity().getIntent().getExtras();

Note: This Question is unanswered, help us to find answer for this one

302. Which of these is NOT a Layout derived from the ViewGroup class?

Answer

Correct Answer: ListViewLayout

Note: This Question is unanswered, help us to find answer for this one

303. Who is known as the 'Father' of Android?

Answer

Correct Answer: Andy Rubin

Note: This Question is unanswered, help us to find answer for this one

304. What are some examples of direct descendants of the android.view object?

Answer

Correct Answer: Both of these

Note: This Question is unanswered, help us to find answer for this one

305. What is the name of the new design guidelines given by Google ?

Answer

Correct Answer: Material Design

Note: This Question is unanswered, help us to find answer for this one

306. What causes an Activity's onDestroy() method to be called.

Answer

Correct Answer: All of these reasons.

Note: This Question is unanswered, help us to find answer for this one

307. Every Android application runs in its own process...

Answer

Correct Answer: with its own instance of the Dalvik Virtual Machine.

Note: This Question is unanswered, help us to find answer for this one

308. Which layout is deprecated since version 2.3?

Answer

Correct Answer: Absolute Layout

Note: This Question is unanswered, help us to find answer for this one

309. Which tag is used to add "Star Rating" in XML layout file?

Answer

Correct Answer: RatingBar

Note: This Question is unanswered, help us to find answer for this one

310. What is the name of the main thread in Android

Answer

Correct Answer: UI thread

Note: This Question is unanswered, help us to find answer for this one

311. What permission does your application need to use the network?

Answer

Correct Answer: android.permission.INTERNET

Note: This Question is unanswered, help us to find answer for this one

312. How do you disable the scrollbars for a webview?

Answer

Correct Answer: <WebView android:scrollbars="none" />

Note: This Question is unanswered, help us to find answer for this one

313. True or False: The Android operating system is a multi-user Linux system in which each application is a different user.

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

314. In order to be notified of a device switching from landscape to portrait view, you should:

Answer

Correct Answer: Both of these

Note: This Question is unanswered, help us to find answer for this one

315. In which resource folder do we create an animation file ?

Answer

Correct Answer: anim

Note: This Question is unanswered, help us to find answer for this one

316. What is the proper order of life cycle methods called when an Activity is first run?

Answer

Correct Answer: onCreate(), onStart(), onResume()

Note: This Question is unanswered, help us to find answer for this one

317. If your application uses the camera on an Android powered device, the following line should be in your manifest file:

Answer

Correct Answer: <uses-feature android:name="android.hardware.camera" />

Note: This Question is unanswered, help us to find answer for this one

318. True or False? It is possible to give the preferred install location, internal or external memory, in the manifest.xml

Answer

Correct Answer: true

Note: This Question is unanswered, help us to find answer for this one

319. What is the main hardware platform of Android?

Answer

Correct Answer: ARM architecture

Note: This Question is unanswered, help us to find answer for this one

320. In activity A if you start Activity B with result you should override

Answer

Correct Answer: onActivityResult(int requestCode, int resultCode, Intent data) on Activity A

Note: This Question is unanswered, help us to find answer for this one

321. The Android SDK tools compile your application into an Android application (.apk file) which...

Answer

Correct Answer: contains all the information needed to install the application on an Android device.

Note: This Question is unanswered, help us to find answer for this one

322. Which is NOT a default value used for a Toast length parameter?

Answer

Correct Answer: LENGTH_SMALL

Note: This Question is unanswered, help us to find answer for this one

323. If you wanted to store a name/value string pair for your Android application, which class would you use?

Answer

Correct Answer: android.content.SharedPreferences

Note: This Question is unanswered, help us to find answer for this one

324. What is the recommended IDE for Android by Google

Answer

Correct Answer: Android Studio

Note: This Question is unanswered, help us to find answer for this one

325. Who can submit applications to the Marketplace?

Answer

Correct Answer: Registered Android Market developers

Note: This Question is unanswered, help us to find answer for this one

326. Which of these widgets is an input box for a user to enter text?

Answer

Correct Answer: EditText

Note: This Question is unanswered, help us to find answer for this one

327. Which of the following is used to detect when a user clicks or taps on a button?

Answer

Correct Answer: OnClickListener

Note: This Question is unanswered, help us to find answer for this one

328. An android application can be converted into an IOS application using a desktop application called "And-to-IOS" easily and still get the same result on IOS.

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

329. Which of the following are different types of Android application components?

Answer

Correct Answer: all of these

Note: This Question is unanswered, help us to find answer for this one

330. Do you need to buy an android developer account to start developing and testing applications on Android ?

Answer

Correct Answer: No

Note: This Question is unanswered, help us to find answer for this one

331. The Android Manifest file has what extension?

Answer

Correct Answer: .xml

Note: This Question is unanswered, help us to find answer for this one

332. Which statement correctly changes content of a TextView named textLabel to show "Your Text"?

Answer

Correct Answer: textLabel.setText("Your Text");

Note: This Question is unanswered, help us to find answer for this one

333. Which of the following are versions of Android?

Answer

Correct Answer: All of these

Note: This Question is unanswered, help us to find answer for this one

334. In order to specify layouts so that they adapt to any screen size, specify dimensions in:

Answer

Correct Answer: Density-independent pixels

Note: This Question is unanswered, help us to find answer for this one

335. Your Android application components are defined in the...

Answer

Correct Answer: AndroidManifest.xml file.

Note: This Question is unanswered, help us to find answer for this one

336. What kernel is Android based on?

Answer

Correct Answer: Linux Kernel

Note: This Question is unanswered, help us to find answer for this one

337. Which of the following are a function of the manifest file?

Answer

Correct Answer: all of these

Note: This Question is unanswered, help us to find answer for this one

338. What is the brand name of Google's own line of Android smartphones?

Answer

Correct Answer: Nexus

Note: This Question is unanswered, help us to find answer for this one

339. What is the first method called in the Activity Lifecycle?

Answer

Correct Answer: onCreate()

Note: This Question is unanswered, help us to find answer for this one

340. What is an application component that can perform long-running operations in the background and does not provide a user interface?

Answer

Correct Answer: Service

Note: This Question is unanswered, help us to find answer for this one

341. Which subclass of a Preference class displays a list of entries as a dialog?

Answer

Correct Answer: Both of these

Note: This Question is unanswered, help us to find answer for this one