Android Security Flashcards
6 cards from real Android Development practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 Android Security flashcards as text
What is the purpose of declaring permissions in AndroidManifest.xml?
Answer: To declare what capabilities or data access the app requires
Declaring permissions in the manifest tells the Android system and users what sensitive resources or data the app needs access to.
Which protection level requires the user to explicitly grant a permission at runtime?
Answer: dangerous
Permissions with protection level 'dangerous' require explicit user approval at runtime because they access sensitive data or device features.
Which Android API checks whether a runtime permission has been granted?
Answer: ContextCompat.checkSelfPermission()
ContextCompat.checkSelfPermission() returns PERMISSION_GRANTED or PERMISSION_DENIED to indicate whether the app has a specific runtime permission.
What does ProGuard/R8 do in Android release builds?
Answer: Shrinks, obfuscates, and optimizes code
ProGuard/R8 removes unused code, renames classes and methods to short names, and optimizes bytecode to reduce APK size and hinder reverse engineering.
What is the Android Keystore System used for?
Answer: To securely store cryptographic keys that cannot be extracted from the device
The Android Keystore System allows apps to generate and store cryptographic keys in a secure container, making them difficult to extract from the device.
Which class is used to encrypt data using the Android Keystore in modern Android?
Answer: Cipher
The Cipher class from javax.crypto is initialized with keys from the Android Keystore to perform encryption and decryption operations.