Try to answer these 40 Android MCQs and check your understanding of the Android subject.
Scroll down and let's begin!
A. AndroidManifest.xml
B. Components.xml
C. AppManifest.xml
D. ComponentManifest.xml
A. Android:talkBack
B. Android:labelFor
C. Android:hint
D. Android:contentDescription
A. Set breakpoints and then step through the code line by line
B. Use the profiler tools in Android Studio to detect anomalies CPU, and network usage.
C. Add a Thread.sleep() call before you start the new activity.
D. Inspect the logs in Logcat.
A. All of these answers
B. The device token is not being sent to push provider correctly.
C. Google Play Services is not installed on the deivce/emulator.
D. Battery optimization is turned on on the device.
A. Process:In the background;Activity:Is stopped
B. Process:In the background;Activity:Is paused
C. Process:In the foreground;Activity:Is started
D. Process:In the foreground;Activity:Is paused
A. In build.gradle:include ':app',':about' ':settings'
B. In settings.gradle:include ':app',':about' ':settings'
C. In settings.gradle:include ':about',':settings'
D. In gradle.properties:include ':app',':about' ':settings'
A. To denote that a class, methos, or field has its visibility relaxed to make code testable
B. To denote that a class, method, or field is visible only in the test code
C. To denote that a class, method, or field has its visibility increased to make code less testable
D. To throw a run-time error if a class, methos, or field with this annotation is accessed improperly
A. When calling finish()in the parent activity
B. When placing an app into the background by sitching to another app
C. When onStop() is called in the target activity
D. When calling finish() in the target activity
A. @DELETE("events) fun deleteEvent(@Path("id") id: Long): Call
B. @DELETE("events/{id}") fun deleteEvent(@Path("id") id: Long): Call
C. @REMOVE("events/{id}") fun deleteEvent(@Path("id") id: Long): Call
D. @DELETE("events/{id}") fun deleteEvent(@Path("id") id: Long): Call
A. When you need to have the app's strings present in multiple lanuages
B. When you have to provide different versions of your app based on the physical device size
C. When you want to provide different versions of your app based on the device screen density
D. When you want to provide different version of your app with custom configuration and resources
A. The test runner facilitates loading your test package and the app under test onto a device or emulator, runs the test, and reports the results.
B. The test runner creating screenshots of each screen that displayed while tests are executed.
C. The test runner facilitates parallelization of test classes by providing for each test class.
D. The test runner facilitates interacting with visible elements on a device, regardless of the activity or fragment that has focus.
A. The onSaveInstance()method
B. All of these answers
C. Persistent storage
D. ViewModel objects
A. Root.find(R.id.text_home)
B. FindViewById(R.id.text_home)
C. Root.getById(R.id.text_home)
D. Root.findViewById(R.id.text_home)
A. Thread Not Responding
B. Application Paused
C. Application Not Responding
D. Application Blocked
A. GetPreferances(this).getString(Email,
B. GetDefaultSharedPrefarances(this).getString(EMAIL,null)
C. GetDefaultSharedPreferances(this).getString(EMAIL,
D. GetPreferances(this).getString(EMAIL,null)
A. Although screen pixel density varies, this does not impact the use of pixels to define sizes.
B. Large devices always have more pixels, so your UI elements will be e=affected if you define them with pixels.
C. The same number of pixels may correspond to different physical sizes, affecting the appearance of your UI elements.
D. Different devices have different understanding of what a pixel is , affecting the appearance of your UI elements
A. List devices
B. Adb devices
C. List avd
D. Dir devices
A. External file storage
B. SharedPereferences
C. SQLite
D. Internal file storage
A. @GET("photo/{id}"} fun listPhotos(@Path("id") id:Long?) : Call
B. @LIST("photo") fun listPhotos() : Call
C. @GET("photo") fun listPhotos() : Call
D. @GET("photo") fun listPhotos() : Call
A. AssertThat(resultAdd).is(2.0)
B. AssertNotNull(resultAdd)
C. AssertThat(resultAdd).isWqualTo(2.0)
D. AssertThat(resultAdd)
A.
B.
C.
D.
A. Fr-land-drawable
B. Drawable-fr-land
C. Drawable-french-land
D. French-land-drawable
A. Android.permission.ACCESS_NETWORK_STATE
B. To monitor the location of the devices so that you don't attempt to make network calls when the user is stationary
C. To request the ability to make network calls from your app
D. To monitor the network state of the device so that you can display an in-app banner to the user
E. To monitor the network state of the devices so that you don't attempt to make network calls when the network is unavailable
A. When you need access to the original file names and file hierarchy
B. When you need access to the file with its resource ID, like R.assets.filename
C. When you have XML files that define tween animations
D. When you need to access the file in its raw form using Resources.openRawResource()
A. Users can select their favorite photo apps to take pictures.
B. You do not have to make a permission request in your app to take a picture.
C. You have full control over the user experience. The app that handles the camera intent will respect your design choices.
D. You do not have to design the UI. The app that handles the camera intent will provide the UI.
A. When a user first opens your app and you want to provide an explanation for the use of a given permission
B. When a user has previously denied the request for a given permission and selects "Tell me more"
C. When a user has previously denied the request for a given permission and you want to provide an explanation for its use
D. when a user has previously denied the request for a given permission and selected "Don't ask again," but you need the permission for your app to function
A. JPG
B. PNG
C. MPEG
D. WebP
A. Checking whether ProGuard -keepclassmembers have been added to the network data transfer objects (DTOs) in question
B. Using the profiler tools in Android Studio to detect anomalies in CPU, memory, and network usage
C. Checking for exceptions in the server logs or server console
D. Checking that the network data transfer object has @SerizlizedName applied to its member properties
A. Test
B. AndroidTest
C. App
D. Main
A. Use the ActivityManager.isLowRamDevice() method to find out whether a device defines itself as "low RAM."
B. Use the Activity.islowRam() method to find out whether a device defines itself as "low RAM."
C. Use the ConnectivityManager.hasLowMemory() method to find out whether a device defines itself as "low RAM."
D. Make an image download request and check the remaining device storage usage.
A. Use a common Gradle module shared by different Android projects.
B. Prefer to build custom views or fragments over activities.
C. Prefer to build activities instead of fragments.
D. Break down UI layouts into common elements and use
A. LinearLayout
B. ConstraintLayout
C. FrameLayout
D. RelativeLayout
A. Root_project_dir/app/build.gradle.
B. Root_project_dir/settings.gradle.
C. Root_project_dir/build.gradle.
D. Root_project_dir/app/gradle.properties.
A. The Application class is instantiated before any other class when the process for the application is created.
B. The Application class is instantiated after any permissions requests when the process for the application is created.
C. The Application class is created each time a new Activity is launched, making it ideal for initialization code.
D. The Application class is created each time a background service is called, making it ideal for initialization code.
A. /drawable
B. /icon
C. /mipmap
D. /launcher
A. When the tests consist only of unit tests.
B. When the number of tests to run is large(500+).
C. When the tests need to run on your local machine.
D. When the tests need to run on real or virtual devices.
A. This APK is created on a developer machine from the debug product flavor.
B. This APK is created from the internalDebug product flavor.
C. This APK created from the debug product flavor and internal build type.
D. This APK is created from the debug build type and internal product flavor.
A. You have included incorect format information in your build.gradle file.
B. You have added more than 20 dependencies to your build.gradle.
C. You have exceeded the total number of methods that can be referenced within a single DEX file.
D. You have a NullPointerException in your code.
A. Apply plugin: 'com.module.library'
B. Apply plugin: 'com.android.library'
C. Apply plugin: 'com.module.library'
D. Include plugin: 'com.module.library'
A. It allows Android to choose the appropriate resource based on the current configuration during runtime.
B. It allows you to have more performant applications because the code and resources are separated.
C. It allows you to provide a different Ul experience based on the user's language settings.
D. It allows you to provide a different Ul experience based on the user's device size.
A. Activity
B. Content provider
C. Fragment
D. Service
A. ListView
B. Recycler View
C. LinearLayout
D. Scrollview
A. Intent(this, AboutActivity::class).also { intent -> startService(intent) }
B. Intent(this, AboutActivity::class.java).also { intent -> startActivity(intent) }
C. Intent(this, AboutActivity::class).also { intent -> activity(intent) }
D. Intent(this, AboutActivity::class).also { intent -> startActivity(intent) } Explanation: Intent(Context packageContext, Class> cls) Notice: Class not KClass
A. It describes the component of the application
B. It declares the minimum level of the android API that the application requires
C. It facilitates to provide a uinque name for the application by specifying package name
D. All of the above
A. Android:targetSdkVersion
B. Android:minSdkVersion
C. Android:maxSdkVersion
D. None of the above
A. R8
B. ProGuard
C. Shrinker
D. D8 Explanation: When you build your project using Android Gradle plugin 3.4.0 or higher, the plugin no longer uses ProGuard to perform compile-time code optimization. Instead, the plugin works with the R8 compiler to handle
A. WorkManager
B. AsyncTask
C. IntentService
D. Thread
A. Library module
B. Dynamic feature module
C. Android app module
D. Google Cloud module
A. BuildConfig
B. BuildInfo
C. ConfigParams
D. ConfigInfo