0
0
Android Kotlinmobile~10 mins

APK vs App Bundle in Android Kotlin - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to declare a variable representing an APK file extension.

Android Kotlin
val fileExtension = "[1]"
Drag options to blanks, or click blank then click option'
A.apk
B.exe
C.zip
D.aab
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing APK with App Bundle extension .aab
Using desktop executable extensions like .exe
2fill in blank
medium

Complete the code to declare a variable representing an App Bundle file extension.

Android Kotlin
val bundleExtension = "[1]"
Drag options to blanks, or click blank then click option'
A.app
B.aab
C.apk
D.zip
Attempts:
3 left
💡 Hint
Common Mistakes
Using .apk instead of .aab
Confusing with generic archive extensions like .zip
3fill in blank
hard

Fix the error in the code to correctly check if a file is an APK.

Android Kotlin
if (fileName.endsWith("[1]")) {
  println("This is an APK file.")
}
Drag options to blanks, or click blank then click option'
A.apk
B.aab
C.zip
D.exe
Attempts:
3 left
💡 Hint
Common Mistakes
Checking for .aab instead of .apk
Using incorrect or unsupported file extensions
4fill in blank
hard

Fill the blank to create a function that returns true if the file is an App Bundle.

Android Kotlin
fun isAppBundle(fileName: String): Boolean {
  return fileName.endsWith("[1]")
}
Drag options to blanks, or click blank then click option'
A.zip
B.apk
C.aab
D.bundle
Attempts:
3 left
💡 Hint
Common Mistakes
Using .apk extension which is for APK files
Using unrelated extensions like .zip
5fill in blank
hard

Fill all three blanks to create a Kotlin map describing differences between APK and App Bundle.

Android Kotlin
val appFormats = mapOf(
  "APK" to "[1]",
  "App Bundle" to "[2]",
  "Delivery" to "[3]"
)
Drag options to blanks, or click blank then click option'
ASingle installable file
BMultiple optimized APKs generated by Google Play
CDirect install on device
DRequires Google Play for optimized delivery
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up delivery methods
Confusing APK with App Bundle features