Complete the code to declare a variable representing an APK file extension.
val fileExtension = "[1]"
The APK file extension is .apk, which is the package format for Android apps.
Complete the code to declare a variable representing an App Bundle file extension.
val bundleExtension = "[1]"
The App Bundle file extension is .aab, which is used to upload apps to Google Play for optimized delivery.
Fix the error in the code to correctly check if a file is an APK.
if (fileName.endsWith("[1]")) { println("This is an APK file.") }
The endsWith method should check for .apk to identify APK files.
Fill the blank to create a function that returns true if the file is an App Bundle.
fun isAppBundle(fileName: String): Boolean {
return fileName.endsWith("[1]")
}The function checks if the file ends with .aab to identify App Bundles.
Fill all three blanks to create a Kotlin map describing differences between APK and App Bundle.
val appFormats = mapOf( "APK" to "[1]", "App Bundle" to "[2]", "Delivery" to "[3]" )
This map explains that APK is a single installable file, App Bundle lets Google Play generate multiple optimized APKs, and delivery requires Google Play.