Which Android permission you should add to allow your application to read the device’s address book?A . READ_ADDRESS_DATAB . READ_PHONE_STATEC . READ_PHONE_CONTACTSD . READ_CONTACTS View Answer Answer: D Explanation: To do any type of search of the Contacts Provider, your app must have READ_CONTACTS permission. To request this, add this <uses-permission> element to your...
Continue readingWhich of the following is NOT a valid usage for Intents?
Which of the following is NOT a valid usage for Intents?A . Activate and ActivityB . Activate a ServiceC . Activate a Broadcast receiverD . Activate a SQLite DB Connection. View Answer Answer: D Explanation: References: Android ATC Self Study Guide http://www.androidatc.com/pages-19/Self-Study...
Continue readingWhich of the following methods is called first in an Activity when another activity gets into the foreground?
Which of the following methods is called first in an Activity when another activity gets into the foreground?A . onStop()B . onPause()C . onDestroy()D . onExit() View Answer Answer: B Explanation: onPause() is where you deal with the user leaving your activity. References: http://developer.android.com/reference/android/app/Activity.html...
Continue readingWhich of the following makes a ListView Clickable?
Which of the following makes a ListView Clickable?A . setClickable(true)B . setVisibility(View.Visible)C . setEnabled(true)D . setItemsEnabled(true) View Answer Answer: C...
Continue readingWhat does the following line of code achieve?
What does the following line of code achieve? Intent intent = new Intent(FirstActivity.this, SecondActivity.class );A . Creates a hidden IntentB . Creates an implicit IntentC . Create an explicit IntentD . Create an explicit Intent View Answer Answer: D Explanation: References: Android ATC Self Study Guide http://www.androidatc.com/pages-19/Self-Study...
Continue readingWhich of the following information cannot not be included in the Manifest file?
Which of the following information cannot not be included in the Manifest file?A . The activities contained in the applicationB . The permissions required by the applicationC . The application’s minimum SDK version required.D . The handset model compatible with your application. View Answer Answer: D Explanation: Among other things, the manifest does the...
Continue readingWhat is the name of the folder that contains the R.java file?
What is the name of the folder that contains the R.java file?A . srcB . resC . binD . gen View Answer Answer: D Explanation: References: Android ATC Self Study Guide http://www.androidatc.com/pages-19/Self-Study...
Continue readingWhat best explains the code above?
Consider the following code: Intent i = new Intent(this, MainActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i); What best explains the code above?A . The activity being launched is already running in the current task, then instead of launching a new instance of that activity, all of the other activities on top of it will be closed and this...
Continue readingWhich of the following is a Java call-back method invoked when a view is clicked?
Which of the following is a Java call-back method invoked when a view is clicked?A . DetectorB . OnTapListenerC . OnClickDetectorD . OnClickListener View Answer Answer: D Explanation: References: Android ATC Self Study Guide http://www.androidatc.com/pages-19/Self-Study...
Continue readingHow to enable JavaScript in WebView?
How to enable JavaScript in WebView?A . myWebView. setJavaScriptEnabled(true);B . myWebView.getJavaScriptSettings.setEnabled(true)C . myWebView.getSettings().setJavaScriptEnabled(true);D . Java script is always enabled in WebView View Answer Answer: C Explanation: JavaScript is disabled in a WebView by default. You can enable it through the WebSettings attached to your WebView. You can retrieve WebSettings with getSettings(), then enable JavaScript...
Continue reading