Android Quiz
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 0% Most missed: “What should you use to display a large, scrolling list of elements?”

MCQs For LinkedIn Skill Assessments.

Android Quiz
Time left 00:00
25 Questions

1. What folder should you use for your app's launcher icons?
2. When should you use the androidTest directory to store your test classes?
3. How would you retrieve the value of a user's email from SharedPreferences while ensuring that the returned value is not null?
4. When will an activity's onActivityResult()be called?
5. What tag should you use to add a reusable view component to a layout file?
6. When would you use the 'ActivityCompat.shouldShowRequestPermissionRationale()' function?
7. You need to provide your users with certain features of your app on-demand or as instant experiences through Google Play. Which type of module should you create?
8. When should you store files in the '/assets' directory?
9. Given the fragment below, how would you get access to a TextView with an ID of text_home contained in the layout file of a Fragment class?
'''
private lateinit var textView: TextView
override fun onCreateView(...): View? {
val root = inflator.inflator(R>layout.fragment_home, container, false)
textView = ??
return root
}
10. Which statement, in build.gradle file, correctly denotes that the corresponding module is an Android library module?
11. You need to upgrade to the latest version of the Android Gradle plugin. Which file should you modify?
12. Given this code snippey from a build.gradle file, which choice is not a possible build variant?
android {
...
defaultConfig{...}
buildTypes{
debug{...}
releasae{...}
}
flavorDimensions 'environment'
productFlavors {
producation {...}
staging {...}
}
}
13. You need to get a list of devices that are attached to your computer with USB debugging enable. Which command would execute using the Android Debug Bridge?
14. Why do you use the AndroidJUnitRunner when running UI tests?
Notice: AndroidJUnitRunner lets us run JUnit3/4-style tests on Android Devices
15. What is '_not_' a good way to reuse Android code?
16. What is the benifit of using @VisibleForTesting annotation?
17. To shrink your code in release builds, what tool does Android Studio use?
18. You need to retrieve a list of photos from an API. Which code snippet defines an HTML GET request in Retrofit?
19. You want to allow users to take pictures in your app. Which is _not_ an advantage of creating an appropriate 'intent', instead of requesting the camera permission directly?
20. Why is it problematic to define sizes using pixels on Android?
21. When attempting to build your project, what might the following error indicate?
'Conversion to Dalvik format filed: Unable to execute dex: method ID not in [0, 0xffff]: 65536'
22. Which approach is not recommended for providing a useful offline state in your app?
23. Why do developers often put app initialization code in the Application class?
24. Why might you need to include the following permission to your app?
'android.permission.ACCESS_NETWORK_STATE'
25. What should you use to display a large, scrolling list of elements?