Android (Developer) 2015

1. Where would we specify which activity should launch first in our app
Answers:
• Main Class file
• All of the above
• Manifest file
• properties file

2. Which callbacks in AsyncTask gets executed on main thread
Answers:
• onProgressUpdate
• both onPostExecute and onProgressUpdate
• doInBackground
• onPostExecute
3. What is a benefit of deodexing?
Answers:
• Custom themes
• Speed boost
• Remove files
• Install custom apps
4. what function is used to send value from one activity to another?
Answers:
• intent.send()
• intent.transfer()
• send()
• intent.putextra()
5. Which class MediaPlayer extends in android?
Answers:
• Object
• AndroidMediaPlayer
• MediaPlayerToolKit
• Activity
• MediaPlayerStream
6. What database is available for developers in Android?
Answers:
• SQL Server
• NoSQL
• SQLite
• There is no available database
• Oracle
7. Which of the following are versions of Android?
Answers:
• Froyo
• Eclair
• All of these
• Gingerbread
8. What kernel is Android based on?
Answers:
• NT Kernel
• XNA
• Mach Kernel
• Linux Kernel
9. Which programming language is used to develop application for the Android platform?
Answers:
• JavaScript
• Java
• C#
10. Which of the following are a function of the manifest file?
Answers:
• declare the minimum API level required
• all of these
• declare the level of user permissions required.
11. Your Android application components are defined in the...
Answers:
• AndroidManifest.pkg file.
• myApp.xml file.
• AndroidManifest.xml file.
12. What is the official website for Android programmers?
Answers:
• stackoverflow.com/
• anddev.org
• eclipse.org/android
• developer.android.com
• android.google.com
13. Which Virtual Machine (VM) does the android system use?
Answers:
• KVM
• VMLite
• Erlang
• Dalvik
14. Which statement correctly changes content of a TextView named textLabel to show "Your Text"?
Answers:
• textLabel = "Your Text";
• textLabel.setText("Your Text");
• textLabel.text("Your Text");
• textLabel.text = "Your Text";
15. What is the name of component used to display web pages in the application?
Answers:
• Browser
• WebView
• BrowserView
• WebBrowser
16. Which of the following are different types of Android application components?
Answers:
• activities
• services
• none of these
• all of these
17. Which is NOT a default value used for a Toast length parameter?
Answers:
• LENGTH_SHORT
• LENGTH_LONG
• LENGTH_SMALL
18. Which of the following is used to detect when a user clicks or taps on a button?
Answers:
• OnClickListener
• OnTouchListener
• OnClickDetecter
• OnTapListener
19. What is an application component that can perform long-running operations in the background and does not provide a user interface?
Answers:
• Activity
• Service
• Content-provider
• Broadcast receiver
20. What is the main hardware platform of Android?
Answers:
• ARM architecture
• MIPS
• None of these
• x86
21. Which of these widgets is an input box for a user to enter text?
Answers:
• TextBox
• Label
• EditText
• TextView
22. Who can submit applications to the Marketplace?
Answers:
• Only Google employees
• Anyone and everyone
• Registered Android Market developers
• Only device manufacturers and their employees
23. What is the proper order of life cycle methods called when an Activity is first run?
Answers:
• onCreate(), onRestart(), onResume()
• onStart(), onCreate(), onResume()
• onCreate(), onResume(), onStart()
• onCreate(), onStart(), onResume()
• onStart(), onResume, onCreate()
24. Which of the following was NOT a name used in any previous versions of Android (3.2)?
Answers:
• Honeycomb
• Eclair
• Gingerbread
• Cannoli
25. Which of the following isn't a valid stage in an Activity's lifecycle?
Answers:
• onPause
• onCreate
• onStop
• onFinish
• onStart
26. Which layout is deprecated since version 2.3?
Answers:
• Relative Layout
• Frame Layout
• Absolute Layout
• Table Layout
27. You can retrieve the resources for your applications by using:
Answers:
• android.content.pm
• android.app.getResources()
• android.content.getResources()
28. What causes an Activity's onDestroy() method to be called.
Answers:
• All of these reasons.
• The Activity is paused or stopped and it's resources were needed by the operating system.
• The Activity called finish().
• The Activity that launched this Activity called finishActivity()
29. What is the official name of the Android 3.0 SDK?
Answers:
• Donut
• Froyo
• Ice Cream Sandwich
• Honeycomb
• Gingerbread
30. True or False: The Android operating system is a multi-user Linux system in which each application is a different user.
Answers:
• True
• False
31. Which event listener is used to handle when an Android device has changed orientation?
Answers:
• OrientationEventListener
• LayoutEventListener
• DeviceOrientationEventListener
• PositioningEventListener
32. What is the key used for an bundle extra parameter on a PendingIntent holding a location?
Answers:
• public static final String KEY_STATUS_CHANGED
• public static final String KEY_PROVIDER_ENABLED
• public static final String KEY_LOCATION_CHANGED
• public static final String KEY_PROXIMITY_ENTERING
33. What permission does your application need to use the network?
Answers:
• android.permission.NETWORK
• android.security.INTERNET
• android.permission.INTERNET
• The network features do not require a permission
• android.security.NETWORK
34. What is the primary license of Android?
Answers:
• OSI
• Apache License
• MIT
• GPL
35. What are some examples of direct descendants of the android.view object?
Answers:
• Both of these
• ProgressBar
• Neither of these
• ViewGroup
36. Which of these is NOT a Layout derived from the ViewGroup class?
Answers:
• RelativeLayout
• ListViewLayout
• AbsoluteLayout
• LinearLayout
37. Which tag is used to add "Star Rating" in XML layout file
Answers:
• RatingWidget
• Rating
• RatingBar
• Stars
38. Which of these ListAdapter subclasses is not a direct subclass of BaseAdapter?
Answers:
• CursorAdapter
• SimpleAdapter
• HeaderViewListAdapter
• ArrayAdapter
39. What package encompasses the interactive UI components of Android such as buttons and text fields?
Answers:
• android.widget
• android.view
• android.view.ViewGroup
40. When an asynchronous task is executed, the task goes through several steps, what option isn't a step of an asynchronous task.
Answers:
• onProgressUpdate()
• onBackground()
• onPostExecute()
• onPreExecute()
41. What is the first method called in the Activity Lifecycle?
Answers:
• onCreate()
• onResume()
• onBegin()
• onInit()
• onStart()
42. Which of the following allows you to instantinate a LocationManager class?
Answers:
• LocationManager lm = new LocationManager(Context.LOCATION_SERVICE);
• LocationManager lm = (LocationManager)getSystem().getService(Context.LOCATION_SERVICE);
• LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
• LocationManager lm = (LocationManager)Runtime.getSystemServiceInstance(Context.LOCATION_SERVICE);
• LocationManager lm = (LocationManager)SystemServiceFactory.createSystemService(Context.LOCATION_SERVICE);
43. Which of the following is a public constructor for canvas?
Answers:
• canvas(AttributeSet set)
• canvas(Context context)
• canvas(int color)
• canvas(Bitmap bitmap)
44. What is the API version code for the Android 3.2 SDK?
Answers:
• 14
• 15
• 11
• 13
• 9
45. What manifest uses-configuration should your application use if your application requires a finger activated touch screen on the device.
Answers:
• <uses-configuration android:reqNavigation="finger" /> must be in your manifest.
• <uses-configuration android:reqTouchScreen /> must be in your manifest.
• <uses-configuration android:reqTouchScreen="finger" /> must be in your manifest.
46. You should extend which class when using/creating a database?
Answers:
• SQLiteDatabase
• SQLiteHelper
• SQLiteDatabasehelper
• None of the above
• SQLiteOpenHelper
47. Which of the following is NOT a subclass of TextView?
Answers:
• Button
• EditText
• Radio Button
• Image Button
48. Which of these Activity lifecycle events is called when the activity is about to become visible to the user from a hidden state.
Answers:
• onStart()
• onResume()
• Resume()
• onCreate()
• Start()
49. You can control process usage in your Android application by...
Answers:
• both of these
• using the android:process attribute on the specific component defined in the manifest.
• neither of these
• moving your components up in the process lifecycle hierarchy.
50. What permission is required for your application to use the device's vibrate hardware?
Answers:
• android.hardware.VIBRATE
• android.permission.VIBRATE
• android.permission.hardware.VIBRATE
• android.hardware.permission.VIBRATE
• android.security.VIBRATE
51. What is a benefit of deodexing?
Answers:
• Custom themes
• Speed boost
• Install custom apps
• Remove files
52. What permission is required for your application to use the device's vibrate hardware?
Answers:
• android.security.VIBRATE
• android.hardware.permission.VIBRATE
• android.permission.VIBRATE
• android.permission.hardware.VIBRATE
• android.hardware.VIBRATE
53. You should extend which class when using/creating a database?
Answers:
• Time's Up!
• None of the above
• SQLiteHelper
• SQLiteDatabasehelper
• SQLiteDatabase
• SQLiteOpenHelper
54. Which subclass of a Preference class displays a list of entries as a dialog?
Answers:
• MultiSelectListPreference
• Both of these
• ListPreference
• None of these
55. Which statement correctly changes content of a TextView named textLabel to show "Your Text"?
Answers:
• textLabel = "Your Text";
• textLabel.text = "Your Text";
• textLabel.setText("Your Text");
• textLabel.text("Your Text");
56. What causes an Activity's onDestroy() method to be called.
Answers:
• The Activity is paused or stopped and it's resources were needed by the operating system.
• The Activity called finish().
• All of these reasons.
• The Activity that launched this Activity called finishActivity()
57. What manifest uses-configuration should your application use if your application requires a finger activated touch screen on the device.
Answers:
• <uses-configuration android:reqTouchScreen="finger" /> must be in your manifest.
• <uses-configuration android:reqTouchScreen /> must be in your manifest.
• <uses-configuration android:reqNavigation="finger" /> must be in your manifest.
58. You should extend which class when using/creating a database?
Answers:
• SQLiteHelper
• None of the above
• SQLiteDatabase
• SQLiteDatabasehelper
• SQLiteOpenHelper
59. Which service is used to perform IPC, when bind application to a service?
Answers:
• bindService()
• service.application.bindService()
• activity.bindService()
• application.bindService()
60. Which of the following is used for passing data from one activity to another ?
Answers:
• HashMap
• String
• Bundle
• Intent
61. Which tag is used to add "Star Rating" in XML layout file?
Answers:
• Rating
• RatingBar
• Stars
• RatingWidget
62. What is the recommended IDE for Android by Google
Answers:
• Android Studio
• IntelliJ IDEA
• Eclipse ADT
• Netbeans
63. True or false? Fragments are independent from Activities.
Answers:
• True
• False
64. Android layouts are read from which type of file?
Answers:
• txt
• res
• xml
• xaml
65. In order to be notified of a device switching from landscape to portrait view, you should:
Answers:
• Override the onConfigurationChanged event
• Both of these
• Request changes via the android:configChanges="orientation" attribute for activities in your manifest file
66. A layout that organizes its children into a horizontal or vertical stack
Answers:
• TableLayout
• LinearLayout
• FrameLayout
• RelativeLayout
67. Do you need to buy an android developer account to start developing and testing applications on Android ?
Answers:
• No
• Yes
68. Android's main programming language is:
Answers:
• C++
• VB-Script
• Java
• JavaScripts
69. The Android Manifest file has what extension?
Answers:
• .xml
• .java
• .apk
• .jar
70. If I set min sdk version to be 8 for an app , on what version(s) will I NOT be able to run the app?
Answers:
• 8
• 14
• 7
• 12
• 10
71. Android relies on the Linux kernel for which of the following system services?
Answers:
• Security
• Neither security nor network stack
• Network stack
• Both security and network stack
72. How do you request permissions for your application?
Answers:
• Time's Up!
• <requires-permission> in the Android Manifest
• <request-permission> in the Android Manifest
• Submit a request when you publish your application to the android market
• You do not need to request permissions for any application
• <uses-permission> in the Android Manifest
73. If your application uses the camera on an Android powered device, the following line should be in your manifest file:
Answers:
• <uses-feature="android.hardware.camera" />
• <uses-feature name="camera" />
• <uses-feature android:name="android.hardware.camera" />
74. The Android SDK tools compile your application into an Android application (.apk file) which...
Answers:
• then has to be formatted for installation through the Android installer.
• contains information needed by the Universal Mobile Installer to create the install package for Android devices.
• contains all the information needed to install the application on an Android device.
75. If you wanted to store a name/value string pair for your Android application, which class would you use?
Answers:
• android.content.SharedPreferences
• android.content.Resources
• android.content.Cookies
76. If your application needs to access information about the devices wi-fi networks, you need to specify:
Answers:
• <manifest-permission ="android.permission.ACCESS_WIFI_STATE" />
• Both of these
• None of these
• <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />.
77. If your application needs to access information about the devices wi-fi networks, you need to specify:
Answers:
• <manifest-permission ="android.permission.ACCESS_WIFI_STATE" />
• Both of these
• None of these
• <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />.
78. C2DM is deprecated and it was replaced by
Answers:
• Tokudu
• GCS
• APS
• Polling
• GCM
79. In which resource folder do we create an animation file ?
Answers:
• anim
• values
• raw
• drawable
• animation
80. A layout that organizes its children into a horizontal or vertical stack
Answers:
• LinearLayout
• TableLayout
• FrameLayout
• RelativeLayout
81. In which resource folder do we create an animation file ?
Answers:
• animation
• raw
• values
• drawable
• anim
82. Android uses what class to communicate a request for an action to be performed?
Answers:
• Activity
• Service
• Broadcast
• Intent
• Request
83. How do you disable the scrollbars for a webview?
Answers:
• <WebView android:layout_height="wrap_content" />
• all of these
• <WebView android:scrollbars="none" />
• <WebView android:layout_width="wrap_content" />
84. Android version 2.2 is better known as what?
Answers:
• Eclair
• Froyo
• Ice-Cream Sandwich
• Gingerbread
85. The correct way to get pass string in an Intent is (where key and value are both string variables):
Answers:
• intent.putKey(key,value);
• intent.putExtra(key,value);
• intent.putString(key,value);
• intent.putValue(key,value);
86. Every Android application runs in its own process...
Answers:
• with its own instance of the Dalvik Virtual Machine.
• within a shared system wide instance of the Dalvik Virtual Machine.
• with its own instance of the Java Virtual Machine.


No comments:

Post a Comment