注意事项
- 部分题目有答案答案网上收集,仅供参考,并不完全正确,需自行确认
- 题目是手打,如有补充及发现错误时留言 我尽快更新
- 正确答案数量1-3个并不固定
- 阅读有困难,谷歌浏览器翻译即可
题目
1. An Internet-accessing tanking app is crashing when going from Activity A to Activity B but not vice versa. Given the Android Manifest .declaration below, which of the following are valid solutions to fix this issue?
<manifest xmlns:android="http://schemas.android.clamiapkires/android"
package="aom.ourcorp " android:versionCode="2"›
<app>
<activity andraid:name="com.ourcorp.activities.A" android:permission="android.permission.INTERNET"/>
<activfty androllimame="com.ourcorp.activities.B"/>
</app>
</manifest>
A. Add the attribute -- android:perrassion="android.permission.INTERNET" to the Activity B definition.
B. Add the element under the manifest element: <uses-permission android:name="android.permission.INTERNET"/>
C, Remove the attribute -- android:permission="android.permission.INTERNET" from the Activity A definition.
D.Add the element under the manifest element: <uses-feature android:name="android.permission,INTERNET"/>
参考答案: B,C
2. Which of the following modifications can be made to an Android app that contains an alarm feature to provide Android Auto support?
A. Disable the alarm when in Auto mode.
B. Force the app to use STREAM_ALARY and provide a UI element to disable the alarm.
C. Mute the alarm when in Auto mode.
D. Force the app to use STREAM_NOTIFICATION and provide a UI element to disable the alarm.
E. Ensure the device's vibrator is used when the alarm is active.
参考答案: A,B
3. Which of the following statements regarding the Kernel/Application sandbox in Android are true?
A.The Application sandbox is optional for apps.
B.The Application sandbox is optional for Native Code.
C. Each app gets a dedicated part of the filesystem where they can read and write private data without requesting additional permissions.
D. By default, only the kernel and a few core apps run with root permissions.
E.A memory corruption error in an app can affect the memory, or allow arbitrary code execution, of another app.
参考答案:D
4. An Android app is written to interact with "any" Bluetooth device. It is noticed that the app has issues when running on one particular type of Android device, but works on all other types of Android devices. Which of the foliowing areas need to be analyzed to identity the cause of the issue?
A.The Android device's Linux kernel
B. The native Android libraries
C. The app framework's Resource Manager
D. The app's Java code
E. The Android Manifest permissions section related to accessing Bluetooth features
参考答案:B,D
5.Which of the following lines of code display a toast in the top left-most corner of the Android device?
A toast.setGravity(Gravity.TOPlGravity.LEFT, 0, 0) ;
B.toast.setGravity(Gravity.TOP, Gravity.LEFT);
C. toast.setPosition(GravitK.TOP, Gravity.LEFT);
D. toaat.getVerticalGravity(Gravity.TOP);
tonst.setHorizontalGravity(Gravity.LEFT);
E. toast.setPoait1on(Gravity.TOPIGravity.LEFT, O,O);
参考答案:A
6.Which of following can help maximize layout usage but minimize memory footprint in an Android app?
A. Minimize use of fragment layouts.
B. Reuse complete layouts by using <include/>.
C. Embed layouts inside the current layout with the <merge/> tag to help promote layout reuse.
D. Use nested (repeating or more than eight) narrow and deep LinearLayouts whenever possible.
E. Load views that are rarely used on-demand using a component like ViewStub.
参考答案:B,C
7. Which of the following aid developers in making their Android apps device agnostic from a UI point of view?
A. Programmatically (dynamically at runtime) creating layouts or views is the only way to achieve UI views that are device independent.
B The proper use of reusable fragments can minimize the effort required to support new device form factors.
C.Using only standard Android UI components guarantees the exact same full screen appearance on any sized Android davice,
D. Different layouts of the same name defined in their appropriate res/directories can help achieve a uniform look across different sized screens.
E. Using wrap_content,fill_pazent or dp measurements when necessary helps achieve density independent U1 layouts.
参考答案:B,D,E
8.Which of the following statements correctly describe Android's WakeLock feature?
A. WakeLocks are not especially expensive in terms of resource usage and can be used liberally in any app.
B. An exception will be thrown if an app calls acquire () on a WakeLock and the life cycle method cnDestroy () is invoked without the app calling release() on the acquired WakeLock.
C. To use a WakeLock, create an instance of it with new and call it with the invoke method.
D. A WakeLock allows an app to have the device it is running on maintain power to the CPU in situations when the device would normally go to sleep.
E. Any app using a WakeLock must request the android.permisaion.WAKELOCK in the AndroidManifest.xml.
参考答案:B,E
9. An Android app that uses an SQLite database to store its data needs to be updated to have a new table column. if the app uses a dlass (MyDb) that extends SQLiteOpenHelper to perform database tasks, which of the following actions must be performed so that the database is updated in the next app version for users that already have the app installed?
A. The onCreate method of MyDb needs to be modified to perform an alter on the table of interest.
B.The onUpgrade method of MyDb needs to be modified to perform an alter on the table of interest.
C.The onUpdate method of MyDb needs to be modified to perform an alter on the table of interest.
D.The Android Manifest's ’versionName 'attribute needs to be changed to a different value,
E. The constant field DATABASE_VERSICN in the class MyDB needs to be updated by at least 1 (one).
参考答案:B,E
10. An Activity wishes to create its own single SharedPreference instance that is never accessible to other apps or cther in-app activities. Which of the following method calls can be used to accomplish this in an Android app?
A.getSharedPreferencea("mypref",Context.MODE_FRIVATE, VISIBLE.YALSE)
B.getSharedPreferencea("mypref",Context.MODE_WORLD_READABLE)
C. getPreferences(Context.MODE_PRIVATE)
D. getSharedPreferences("activity",Context.MODE_PRIVATE)
E. getSharedPreferencea("mypref",Context.MODE_PRIVATE)
参考答案:E
11. Which of the following techniques can optimize an Android app so it does not drain the device's battery?
A Unregister broadcast intent receivers.
B. Avoid using wake locks.
C. Make unused views INVISIBLE.
D. Release references to an activity after it is finished.
E. Cache data locally to minimize network usage.
参考答案:B,E
12.Which of the following permissions are required to be specified in the androidManifest.xml to obtain network access in an Android app?
A. <uses-permission androzd:name="android.permission.WIFI_ACCESS/>
B. <uses-permission android:nane="andro1d.permission.ACCESS_NETWORK_STATE"/>
C. <uses-permission android:hane="android.permission.KETWORK"/>
D. <uses-permission android:name="andrord.permission.BRORSER_ACCESS />
E. <uses-permission android:name="android.permission.INTERNET·/>
参考答案:E
13. Which of the following statements correctly describe an Action Bar in Android?
A. It is a panel that transitions in from the left edge of the screen and displays the app's main navigation options.
B.It supports consistent navigation and view switching within apps.
C. It is a window feature that identifies the user location in an app and provides user actions and navigation modes.
D. It is a small window that prompts the user to make a decision or enter additional information.
E. It provides simple feedback about an operation in a small popup.
参考答案:B,C,E
14. Which of the following can be performed to find out whether an Android system has the feature "MYFEATURE" avallable at runtime?
A. Check the resuits of Build,hasSystemFeature("MYFEATURE").
B. Check the results of Build.VERSION.hasSystemFeature("MYEEATURE").
C. Check the results of PackageManager.hasSystemFeature("MYFEATURE").
D. Check the results of System.hasSystemFeature("MYFEATURE").
E. Add the <uses-feature android:name="MYFEATURE" andrord:required="true"> to the androidManifest.xml file.
参考答案:C
15.Which of the following correctly describe the Android FileProvider class?
A. It provides a file connection protocol similar to FTP for sharing files.
B. It generates content URIs for files, based on specifications provided in XML.
C. It provides API calls to parse a file object.
D. It generates file MIME types and content, based on specifications provided in XML.
E. It provides API calls to create a file object.
参考答案:B
16.A layout in an Android app is defined as below. Which of the following will position the View with id "view_a" in the top-right of the LinearLayout and the View with id "v1ew_b" in the bottom-left of the LinearLayout?
<LinearLayout
andzoid:width="200dp"
andzoid:height="wrap_content"
android:orientation="vertical">
<View
andro1d:id="@+id/view_a"
android:width="25dp"
android:height="25dp"/>
<View
andro1d:id="@+id/view_b"
android:width "25dp"
android:height="25dp"/>
</LinearLayout>
A. Set android:layout_alignParentRight="true" on view_a and set android:layout_alignParentLeft="true" on view_b.
B. Set android:gravity="right" on viev_a and set android:gravty="left" on view_b.
C. Set android:gravity="top_right" on view_a and set android:gravity="boteom_1eft" on view_b.
D. Set androad:layout_gravity="top_right" on view_a and set android:layout_gravity="botton_left" on view_b.
E. Set android:layout_gravity="right" on v1ew_e and set android:layout_gravity="left"on view_b.
参考答案:E
17. Which of the following are syntactically correct ways of passing a lambda function as a parameter to the Kotlin function below?
fun run(foo:()-> Unit)(
foo()
)
A. run(()-> & println(""))
B. run (@JvmName foo ->{ println("hello, world")})
C. run({println("hello, world")})
D. run { print("hello,world")}
E. run {()-> println("hello, world") }
参考答案:D
18.In an effort to conserve processing effort while using GPS to get position updates, the Android developer has decided to implement a LocationListener and
request location updates from the location manager based on either at least 7.5 minutes between updates or a GPS location change of greater than 500 meters (1640 feet). Which of the following can be substituted for ***** in the code below to achieve this?
locationManager.requestLocationUpdates( ****);
A. LocationManager.GPS_PROVIDER, 450,500,this
B. LocationManager.NETWORK_PROVIDER,45000,500,this
C. LocationManager.NETWORK_PROVIDER, 7.5, 500, this
D. LocationManager.GPS_PROVIDER, 7.5, 500, this
E. LocationManager.GPS_PROVIDER, 450000, 500, this
参考答案:D
19.An app is required to interact with the user and upon certain conditions being met present a messace to the user with two buttons asking whether to continue or not. Which of the following are actions to fulfill this requirement that do not require additional entries to the Android Manifest?
A. Dynamically create a spinner with the message and the two buttons when needed.
B. Create a menu item containing the message and the two buttons in the onCreate of an activity in the app.
C. Create an AlertDialog.
D. Use a toast.
E. Build a custom activity that represents the message and the two buttons.
参考答案:B,C
20. Which of the following Kotlin code snippets will produce the output below? true
A.
val a: Int? = 10000
val b:Int? = a
println(a == b)
B. val a:Int = 10000
val b:Int? = a
val b:Int? = a
println(b === c)
C. val a:Int? = 10000
val b: Int? =a
printIn(a === b)
D.val a:Int = 10000
val b: Int= 10000
println(a === b)
参考答案:A,B,D
21. An Android app requires API level 23 or higher. The designer requires that any devices not meeting this API requirement should not be able to install the app. Which of the following attnbutes must be entered into the Android Manifest's uses-sdk element to achieve this behavior?
A. android:minSdkVersion="23"
B. android:targetSdkVersion="23"
C.android:minSdkVersion=>"23"
D. android:targetSdkVersion=>"23"
E. maxSdkVersion="23"
参考答案:A
22. Displaying which of the following will cause an Android Auto app to fail the Android Auto App Quality test?
A. Album art on the Auto screen
B. Advertisements on the Auto screen
C. Scrolling text on the Auto screen
D. Icons with fixed colors on the Auto screen
E. A progress bar on the Auto screen
参考答案:B,C,E
23.An HTTP-networked app is having an issue. On fast Internet connections, the app behaves and functions correctly, however on slow connections the app appears to be unable'to connect to the server. Which of the following are valid solutions for preventing this issue?
A. Check the URLConnection class used and set the .getReadTimeOut () to a higher value.
B. Add the <usea-permission android:name="android.permiasion.ACCESS_NETWORK_STATE" /> to the AndroidManifeat.xml file,and then in code query the state of the network to see if it is connected.
C. Check the URLConnection class used and set the .getConnectTimecut () to a higher value.
D. Modify the connection object to retry the connection more times.
E. Reduce data sent back from the server to smaller packets for faster processing.
参考答案:D,E
24. Which of the following are functions of the Android uses-permisson element in the Android Manifest.xml?
A.Specifies a permnssion that must be granted to the aop in, order for some of its functionality to operate as mtended.
B. Informs any external entity of the set of hardware and software features on which an app depends. Specifies a permission that must be granted to the app in order for some of its functionality to operate as intended.
C. Informs the user of the permissions that the app will request at runtime.
D. Specifies which data subsets of the parent Content Provider permission can be granted for.
E. Declares a security permission that can be used to limit access to specific components or features of this or other apps.
参考答案:A,B
25. An Android developer must apply a different look and feel to each of the edit boxes in an app. Which of the following actions fulfill this requirement?
A. Define a theme and have all edit boxes in the layout files use this theme.
B. Replace each edit box XML definition with a custom-defined edit box Java implementation that extends EditTextBox.
C. Define a theme in the Android Manifest hfe as an activity attribute.
D. Create custom drawables for each edit box and place them in the /res/drawable/ folder.
E. Define multiple style elements and have each edit box use a particular style.
参考答案:B,E
26. A tester finds that an Android activity does not have an action bar menu like other activities, though it should. The action bar menu is the same for all the activities and works in all the other activities. Which of the following correctly describe why the action bar menu is not showing and how it can be fixed?
A.The menu is not inflated and should be in the activity's onCreateOpticnaMenu.
B. The action bar is not made visible and should be via a call from the activity's onRegume method.
C. The action bar is not initialized and should be via a call to onCreateActionBar on the act1cnBar object.
D. The action bar is not attached to a parent fragment and must be in the fragment's cn?zagnentCzeate method call.
E. The menu is not inflated and should be in the activity's onAct1cnBarMenu.
参考答案:C
27. Which of the following statements,about an Android Service component are NOT correct?
A. A service runs in the main thread of its hosting process and can therefore still cause blocking within an app if long-running operations are performed directly within the service.
B. It provides a user interface.
C. A service can perform multiple tasks, such as playing music and downloading files, without user interaction.
D. It can perform long-running operations in the background.
E. A service can continue to run even if the user switches apps.
参考答案:B,D
28. Which of the following are components of the Android Application Framework level?
A. Media Framework
B. Package Manager
C. Power Manager
D. Content Providers
E. Telephony Manager
参考答案:B,C,E
29. Which of the following statements correctly describe the management of Android's Content Providers?
A Content Providers present data to external apps as one or more tables that are similar to the tables found in a relational database.
B. Content Providers must declare their authorities in androidManifest . xml if other apps are to make use of them.
C. Activities can only register one Content Provider.
D. Content Providers must use the SQLite database system for their internal data management.
E. Apps need to instantiate a Content Provider and deal with it directly to access a Content Provider's data.
参考答案:A
30. The Android MediaPlayer object is throwing an IllegalStateException during a call to mediaPlayer.atart () . Given the code below, which of the following correctly describe what is wrong or needs to be changed?
...
mediaPlayer.reset();
mediaPlayer.start();
A.The mediaPlayer.stop () method should be called before reset.
B. The medjaPlayer object needs to be in the P1aybackComp leted state with call to mediaPlayer.setState (' PAUSED’) before calling start.
C. The mediaPlayer.release () method should be called before start and after reset.
D. The mediaPlayer.stop() method should be called after reset and before start.
E. The media player is in the idle state after the reset call and needs to have the data source reset and a call to mediaPlayer.prepare () or mediaPlayer.prepareAaync() before calling start.
参考答案:C
31. Which of the following correctly describe the purpose a navigation drawer in Android?
A. It keeps track of user's navigation history which can be read by the app to take the user back or forward in history.
B. It is the primary Android factory class for creating navigation classes.
C. It is a panel that transitions in from the left edge of the screen and displays the app's main navigation options.
D. It is a popup tabbed dialog menu used to display navigation options to the user.
E. It is a menu panel used to toggle between the open apps on the device.
参考答案:D
32. An Android app takes the user's current position and converts it to a physical address using the Geocoder API calls via a call to getFronLocation () . Users have reported that the app is randomly throwing an Application Not Responding (ANR) error. which of the following can be causing this issue?
A. The call to getFroniocat.on () is taking a long time at times and is being called from the UI thread.
B. The locale has not been set properly on the GesCoder object and so the location address call is hanging.
C. The users experiencing the ANR error are not connected to the Internet at the time of the error.
D. The user is not using GPS for location updates.
E. The user's precise location is not known and the app is waiting for a location update.
参考答案:A,C
33. Which of the following are NOT Android UI components that can be used for data input?
A. Radio
B. Toast
C. Spinner
D. Switch
E. Checkbox
参考答案:B
34. Which of the following correctly describe the ShareActionProvider in Android?
A. It is an API for calling a definable group of actions shared among the same app.
B. It is an API for calling button actions that are shared among the Android device apps.
C. It is responsible for sharing data between activities via the SharedPreference object.
D. It is responsible for creating views that enable data sharing.
E.It is an API for calling a definable group of providers shared among the same app.
参考答案:B
35. An Android app is capable of being rotated to either portrait or landscape use. Which of the following methods of the Activity Life Cycle are called afterotating the device to a different orientation?
A .onStart ()
B. onRestart()
C. onCreate()
D. onResume()
E. onStop ()
参考答案:D
36. A company requires its app currently in English to also automatically support French words for all strings defined in the existing resource file named /res/values/strings.xml . Which of the following actions accomplish this?
A . Modify the app code to ask the user for their locale information and dynamically load resource strings based on this value.
B. Add the French words to the existing strings.xml file.
C. Create a file with the appropriate French words in it called res/values/strings.xml.
D. Move /res/valuea/strings.xmi to /zes/values-fr/stringa.xm.
E. Create a file with the appropriate French words in it called res/values-fr/strings.xml.
参考答案:E
37.An Android app developer responsible for testing and updating the targetSdkVersion on the app reports that the device is upgraded to the latest android OS (one API level higher than the existing targetSdkVersion on the app). The developer then installs the app and tests it and it runs fine. The developer then modifies the targetSdkVersion to match the newest API level. The app is reinstalled successfully but now the app is broken in some places and does not run properly. Which of the following are explanations of this issue?
A.The app developer changed the minSdkVersion instead of the targetSdkVersion.
B.The app developer made a typo in the AndroidManifest .xml file causing it to be malformed.
C. The new API contains an updated but 100% backward compatible class that the app uses.
D. The new app fails to run due to multiple versions of the app being installed.
E. The new API contains a new permission that was indirectly used by the app and by moving the targetSdkVersion and not adding the permission the app is no longer able to run correctly.
参考答案:A
38. An Android app designer needs to show a static user-agreement that is currently in HTML on a web server from within the app's part of a workflow process. The designer does not want to modify the app to change this agreement because it may need to be changed often, Which of the following can be used to accomplish the designer's goals?
A. Call startActivity(new Intent (Intent.ACTION_VIEW,-..AGREEMENTPATH.html");from an activity.
B. Use a WebView and call .loadURL (" . . .AGREENENTPATH.html") in an activity in the app.
C. Insert the user agreement text into the SQLite database for the app during installation of the app and update during DB version changes only.
D. Create a custom activity with the user agreement defined in a constant in the strings.xml file.
E. Create a custom dialog with the user agreement defined in a constant in the strings.xml file.
参考答案:B,C
39. Which of the following represent either a feature or property of Android notifications?
A .Notifications can be synced between devices.
B. Notifications can be available on the device's lock screen.
C. User permissions are required to show notifications.
D. Notifications require an action leading to an activity.
E. Notifications keep users informed about relevant and timely events.
参考答案:A,C,D
40. An Android async task is created to offload processing from the main UI thread and allow it to continue processing while the task is performed.The task should update the user with a progress bar at major points while performing the task's main processing. Which of the following correctly describe where and how this update can be performed?
A. In the activity. the task should be invoked by calling _execite () .get () and publish updates by using while (!task.isCancelled())
{// Publish Progress…}
B. In the task's doInBackground method, The task should invoke onProgressUpdate(Progress...) on the UI thread.
C. In the task's onPreExecute method a ProgressBar should be created and shown on the UI thread, and then on the onPostExecute method the task should update the ProgressBar with the processing information.
D.In the task's doInBackground method. The task should create a progress dialog, then show the dialog to the user each time it wants to present an update.
E. In the task's doInBackground method, The task should invoke publishProgess (Progress.… .) on the UI thread.
41. An Android 3.2+ app originally designed for small phones is being redesigned to support larger devices. Devices with a minimum width of at least 600dp regardless of orientation should use a layout specifically designed for larger screens.If the original layout is res/layout/myactivity.xml, which of the following can be used as the new layout?
A.res/layout-large/myactivity.xml
B. res/layout-v600dp/myactivity.xml
C. res/layout-w600px/myactivity.xml
D. res/layout-minWidth_600/myactivity.xml
E. res/layout-sw600dp/myactivity.xml
42.Which of the following can be used to find the lowest compatible ApI level for an Android app regardless of efficiency?
A. Set the target API level and rebuild checking for compile errors when using an IDE compatible for Android development.
B. Set the uses–sdk minSdkVersion attribute to each API level, rebuild the project, and try to install the app on the device originally used for creation and testing.
C. Look at when the Canera class was added to the API and use that API level as the minimum required to work.
D.Use the reference docs and the API level filter to check all the classes used in the app to see if they are available in that API level.
E. Leave the uses-sdk minSdkVersion as is and set the targetSdkVersion on to each API level, rebuild the project, and try to install and run the app on the device originally used for creation and testing.
43. Which of the following statements correctly describe the ImageView view object in Android?
A. Only one ImageView object can exist per activity
B. It can only be used in conjunction with the camera object.
C.It displays live preview images from the camera.
D.It can display images from various sources.
E.It provides various display options, such as scaling and tinting.
44. Which of the following are built-in two-way communication technologies in the Android Framework?
A. Near Field Communication (NFC)
B. GPS
C. Wi-Fi P2P
D. Plain Old Telephone System (POTS)
E. Bluetooth
45. An Android app's activity uses Near Field Communication (NFC)-based technologies when available and currently has the lines of code below:
NfcManager manager = (NfcManager)context.getSystemService(Context.NFC_SERVICE);
NfcAdapter adapter = manager.getDefaultAdapter() ;
46. Which of the follows lines of code produce the same adapter as the above two lines do together?
A. adapter = NfcManager.getDefaultAdapter(null);
B. adapter = NfcAdapter.getDefaultAdapter(NfcManager.get()) ;
C. adapter = NFC.getAdapter(this);
D. adapter = NfcManager.getDefaultAdapter(this);
E. adapter = NfcAdapter.getDefaultAdapter(this);
47. Which of the following are examples of building an explicit intent in Android?
A. Uri uri = Uri.parse("www.example.com"); Intent intent = new Intent(Intent.ACTION_VIEW, uri);
B. Intent intent = new Intent(thia. Myactivity.class);
C. Intent intent = new Intent(); intent.BetAction(Intent.ACTION SEND); intent.putExtra(Intent.EXTRA_TEXT,"text”);
D. Intent intent = new Intent(); intent.setClasaName("com.example.app","com.example.app.MyActivity”);
E. Intent intent = new Intent(Intent.ACTICN SEND): Intent chooser = Intent.createCnooaer(intent,"Chooser");
48. The resource qualifier -s×1080p has been chosen to qualify a drawable resource for a 1080p Android TV. The drawable resource does not appear as desired. Which of the following steps correctly display the drawable?
A. Use the qualifier tvdpi, providing a dpi between medium and high dpi.
B. Use the qualifier sw540dp which takes into account the 320 dpi of Android TVs.
C. Swap the resource for a vector which will scale to match the screen regardless of the qualifier.
D. Import the Android TV Drawable Support package to handle drawable display for Android TV.
E.Programmatically adjust the size of the view containing the drawable since TV dpi is not standardized.
49. A class is defined in Kotlin as below. To use this class in the implementation of a function written in Java, which of the following lines of code will access one of the properties of the object referenced by primal1ty, derived from the Primality class?
class Primality(val num:Int, val isPrime: Boolean)
A. primality.getNum();
B. primality.isPrime;
C. prinality.getIsPrime ()
D. primality.isPrime();
E. primality.num;
50. Which of the following are part of the Android OS libraries?
A. WebKit
B. Activity Manager
C. SQLite
D. Display Driver
E. Notification Manager
51. A company has defined several strings in the resource file /res/values/corp_string_values.xml.However, one of the Android app's activities is showing a compile resource not found error when trying to access R.string.error_mag. Which of the following are possible solutions to resolve this issue?
A. Change the app code to access R.corp_string.error_mag instead of R.string.error_msg.
B.Check that the string resource name 'error_mag' exists in the coxp_string_values.xml file, and, if not, add the string resource name and values to the file.
C. Rename the corp_string.xml file to strings.xml.
D. Add the activity definition to the AndroidManifest.xml file.
E.Move the corp_string_vaiues.xml file to rea/xml/ subfolder.
52.An Android app needs location updates accurate enough to get within 100 meters (328 feet) accuracy (coarse level). On some devices the location updates are not accurate enough, and on all devices the updates appear to come in sporadically, only being seen by the app after another location client requests an update.Which of the following solutions will fix the problem?
A. Decrease the interval on the LocationRequest.
B. Explicitly set the LocationRequest's accuracy to LccationRegpest.COARSE_LOCATION.
C. Add the LocationManager action to the activity's declaration in the androidManifest.xml.
D. Add the ACCESS_FINE_LOCATION permission to the app.
E. Set the LocationRequest's priority to LocationRequest.PRICRITY_BALANCED_POWER_ACCURACY, rather than LocationRequest.PRIORITY_NO_POWER.
53. Which of the following statements regarding the Kernel/Application sandbox in Android are true?
A.The Application sandbox is optional for apps.
B. By default, only the kernel and a few core apps run with root permissions.
C. A memory corruption error in an app can affect the memory, or allow arbitrary code execution, of another app.
D.The Application sandbox is optional for Native Code.
E. Each app gets a dedicated part of the filesystem where they can read and write private data without requesting additional permissions.
54. Which of the following statements correctly describe the management of Android's Content Providers?
A. Apps need to instantiate a Content Provider and deal with it directly to access a Content Provider's data.
B. Activities can only register one Content Provider.
C. Content Providers must use the SQLite database system for their internal data management.
D.Content Providers must declare their authorities in AndroidManifest.xml if other apps are to make use of them.
E. Content Providers present data to external apps as one or more tables that are similar to the tables found in a relational database.
55.An Android app uses both an activity and fragment for its UI components, At the start of an Activity the Fragment is set, then initialized. During the Fragment initialization the developer wants to use a loader to load a large phonebook DB cursor. The UI for the Fragment should display a message to the user when the loader has completed loading. The loader is initialized using getLoaderManager () . initLoader (0, null,this);in the Fragment's onActivityCreated ()method. Which of the following correctly describe how the message to the user will be triggered?
A. The loader callback method dataReady () will be invoked on the Activity.
B. The call to getIoaderManager () .initLoader(0, null, this): blocks until completed invoking the onResume () method in the Activity afterwards.
C. The loader callback method onLoadReset () will be invoked on the Fragment.
D. The loader callback method onLoadFinished () will be invoked on the Fragment.
E. The call to getLoaderManager() .initLoader(0, null, this);blocks until completed invoking the onReaume () method in the Fragment afterwards.
56.Which of the following are valid fundamental menu types applicable to all versions of Android?
A. Options menu
B. Notification menu
C.Checkbox menu
D.Context menu
E.Drop-down menu
57.A fragment is used in an Android activity to display information to the user. The UI should only be updated to reflect changes in the data if the fragment is in the foreground. A bug exists where, given the below implementation, the update () function is being invoked at times when the fragment is not in the foreground. Which of the following changes ensure the app behaves as designed?
if (myFrag.igViaible ())
updateUI(data);
A. Replace the predicate with myFrag.isResumed () .
B. Replace the predicate with myFrag.isAdded() && !myFrag.isHidden() .
C. Replace the predicate with myFrag.isAdded() .
D. Replace the predicate with myFrag.isAvailable() .
E. Replace the predicate with myFrag.isInLayout () .
58.A company has received several complaints about its Goocle Play photo-taking abp being installed on devices without a camera and then inexpiicitly crashing when the app tries to use the camera. Which of the following can be performed to prevent these customers from seeing errors?
A.Add a global custom exception handler to the activity to catch any unknown errors and report them to the user.
B. Add code to the Android Manifest: <uses-feature android:name="android.hardware.camera" required=“true"/>
C. Add code to the Android Manifest:<uses-permission android:name="android.permission.CAMERA"/>
D. Modify the app code where the camera is used to catch the exception causing the crash and inform the user.
E. Add the attribute to each of the manifest activity definitions that use the camera: android:permission="android.permission.CAMERA"
59. Which of the following enable a developer to show a camera preview in an Android app?
A. Use a CaneraSurfacePreview.
B. Use a SurfaceView.
C. Send the CAMERA_IMAGE_CAPTURE Intent, decode the returned data and map to a visible ImageView.
D. Capture the raw incoming data stream and render to a BitMap which is assigned to an ImageView.
E. Use a CameraPreview.
60.Some of an Android Wear app's functionality depends on being paired with an Android phone, including transferring critical data from the Wear device to the phone. Which of the following ensure a reasonable user experience is maintained in the case of unexpected loss of device pairing?
A. Attempt to re-establish the pairing automatically.
B. Ask the user to pair the devices.
C. Disable and re-enable Bluetooth.
D. Gray-out functionality that depends on the pairing.
E. Continue collecting data despite not being able to transmit it.