Beruflich Dokumente
Kultur Dokumente
ORI : 327206351-Android-Multiple-Choice-Questions.pdf
1. What file is responsible for glueing everthing together , explaining what the applicatin consists of,
what its main building blocks are, ext…?
A. Layout file
B. Strings XML
C. R file
D. Manifest file
Ans: D
2. The XML file that contains all the text that your application uses.
A. stack.xml
B. text.xml
C. strings.xml
D. string.java
Ans: C
3. Which of the following is the most “resource hungry” part of dealing with Activities on Android
A. Closing an app
B. Suspending an app
C. Opening a new app
D. Restoring the most recent app
Ans: C
ORI : 327206351-Android-Multiple-Choice-Questions.pdf
9. What builtin database is Android shipped with?
A. SQLite
B. Apache
C. MySQL
D. Oracle
Ans: A
11. The android OS comes with many useful system services, which
include processes you can easily ask for things such as your..
A. All of these and more.
B. Location
C. Sensor Readings
D. WiFi? Hot Spots
Ans: A
13. Which of the following is the correct way to add an access permission to your application?
A. Add a <uses-permission> tag as a child tag of the <manifest> tag in AndroidManifest.xml.
B. Add a <add-permission> tag as a child tag of the <manifest> tag in AndroidManifest.xml.
C. Add a <uses-permission> tag as a child tag of the <application> tag in AndroidManifest.xml.
D. add a <permission> tag as a child tag of the <application> tag in AndroidManifest.xml.
Correct Answer: C
15. What Activity method you use to retrieve a reference to an Android view by using the id attribute of a
resource XML?
A. findViewByReference(int id);
B. findViewById(int id)
C. retrieveResourceById(int id)
D. findViewById(String id)
Correct Answer: B
ORI: gratisexam.com-Android.Testinside.OA0-002.v2014-06-03.by.MARILYN.70q.pdf
17. When creating the following Android project, which is the correct combination of (1)~(3)to add to the
AndroidManifest.xml?
A. Option a
A. Option b
B. Option c
E. Option d
C.
Correct Answer: C
20. The following code is a part of a program which sends a status bar notification. Which is the correct
code toput into (1) so that it will automatically cancel the notification after it occurs?
A. notification.flags |= Notification.FLAG_INSISTENT;
B. notification.flags |= Notification.FLAG_AUTO_CANCEL;
C. notification.setFlags(Notification.FLAG_AUTO_CANCEL);
D. notification.setFlags(Notification. FLAGJNSISTENT);
Correct Answer: B
21. Which is the processing that cannot be executed by using the emulator during development?
A. Displaying information of the heap and threads.
B. Emulation of outgoing calls
C. Ending a process
D. Receiving E-mail
Correct Answer: D
SOAL LAMA
22. What method you should override to use Android’s menu which is placed on the action bar?
A. onCreateOptionsMenu()
B. onCreateMenu()
C. onMenuCreated()
D. onMenuCreated()
23. What Activity method you use to retrieve a reference to an Android view by using the id
attribute of a resource XML?
A. findViewByReference(int id)
B. findViewById(int id)
C. retrieveResourceById(int id)
D. findViewById(String id)
24. Which of the following is not an Android component (i.e. a point from which the system can
enter your application)?
A. Service
B. Activity
C. Layout
D. Content Provider
25. During an Activity life-cycle, what is the first callback method invoked by the system?
A. onStop()
B. onStart()
C. onCreate()
D. onRestore()
26. Which configuration file holds the permission to use the internet?
A. Layout file
B. Property file
C. Java source file
D. Manifest file
28. Which of the following is not a valid Android resource file name?
A. mylayout.xml
B. myLayout.xml
C. my_layout.xml
D. mylayout1.xml
29. What is the role of the R.java file in an Android application project?
A. It contains all resource IDs allowing the developer to reference them from the code using
integers.
B. It contains instructions to build the Android application project.
C. It contains information about content providers of the Android application.
D. It contains the target SDK version number.
33. Which of the following is NOT true about the R.java file?
A. It is auto-generated during the build of the project.
B. It is used by developers to access any resource through an ID.
C. It can be modified manually to change the ID of a resource.
D. It contains resource IDs for all resources in your /res/ folder.
36. What is the difference between Android API and Google API?
A. The google API includes Google Maps and other Google-specificlibraries. The Android
one only includes core android libraries.
B. The google API one only includes core android libraries.
C. The Android includes Google Maps and other Google-specific libraries.
D. None of the above.
37. Which of the following methods is called in an Activity when another activity gets into the
foreground?
A. onStop()
B. onPause()
C. onDestroy()
D. onExit()
38. Which of the following attributes is used to set an activity screen to landscape orientation?
A. screenorientation = landscape
B. screenOrientation=”landscape”
C. android:ScreenOrientation=“landscape”
D. android:screenOrientation=”landscape”
39. Which of the following lines of code is used to pass a value to the next activity?
A. Intent i = new Intent(this,newActivity);
i.addExtra(“test”);
startActivity(i);
B. Intent i = new Intent(this,newActivity);
i.putValue(“test”);
startActivity(i);
C. Intent i = new Intent(this,newActivity);
i.putValue(“value1”,“test”);
startActivity(i);
D. Intent i = new Intent(this,newActivity);
i.putExtra(“value1”,“test”);
startActivity(i);
40. Which of the following is NOT true about class AsyncTask?
A. It must be used by sub-classing it.
B. It must be created on the UI thread.
C. Its sub-class override at least two methods: doInBackground,
onPostExecute.
D. It uses three generic types.
42. Which Android permission you should add to allow your application to read the device’s
address book?
A. READ_ADDRESS_DATA
B. READ_PHONE_STATE
C. READ_PHONE_CONTACTS
D. READ_CONTACTS
46. In which Activity life-cycle method you should do all of your normal static set up such as:
creating views and bind data to lists?
A. onResume()
B. onStart()
C. onCreate()
D. onPause()
47. When including a text file in your application to read from as a resource, what is the
recommended location of such file?
A. res/anim
B. res/files
C. res/raw
D. res/values
48. Which of these is the incorrect method for an Application to save local data?
A. Extend PreferencesActivity and save in an XML file.
B. Save as a file in the local file system.
C. Save in the database using SQLite.
D. Save in the hash table file using the Dictionary class.
49. Which of the following are layout-related methods called by the framework on views, and you
can override them when customizing a view? (Choose two)
A. onMeasure().
B. onDraw().
C. onKeyUp().
D. onSizeChanged().
50. Which one of the following is the primary use of Google Play Licensing Service?
A. To verify that the user did actually pay for the application.
B. To check the number of time user has paid for the application
C. To let the free application start downloading APK expansion files if
your application needs them.
D. To let the paid application start downloading APK expansion files if
your application needs them.