2 ms·
Android apps declare two versions. Basically, the oldest version they can run on, and the newest version whose quirks and new behaviors they're aware of. A goo
by adrianmonk 9y ago
Android apps declare two versions. Basically, the oldest version they can run on, and the newest version whose quirks and new behaviors they're aware of.
A good concrete example is the switch from making users agree to permissions when they install an app to runtime permissions. In the new style, the app is responsible for bringing up dialogs to ask for permissions. In the old style, the system does it when you install. So how does the system know whether your app knows how to ask? By setting targetSdkVersion to 23, you tell the system, "It's safe to assume I know about this new API I'm required to implement." But that doesn't preclude your app from running on older systems, where things behave just like they always did.