Sobes.tech
Middle

What is the difference between Android 9 and Android 10?

sobes.tech AI

Answer from AI

Here are the main differences between Android 9 (Pie) and Android 10:

  • Gesture Navigation: Android 10 introduces a more flexible gesture navigation system with full-screen gestures, replacing the classic three-button navigation bar found in Android 9.
  • Dark Theme: Android 10 provides a system-wide dark theme that apps can easily integrate. In Android 9, dark theme support was less standardized and depended on specific device and app manufacturers.
  • Location Permissions: Android 10 adds the ability to grant location access "only while using the app," unlike Android 9, which only offered "Always" or "Never" options.
  • Notification Prioritization: Android 10 improves the notification management system, allowing users to choose between "Silent" and "Alerting" notifications directly from the panel. Android 9 had a more basic notification category management system.
  • Scoped Storage: Android 10 implements Scoped Storage, limiting app access to files on external storage. Each app gets an isolated storage (sandbox) and can only directly access its own files. Access to other files requires special permissions or the use of system APIs. In Android 9, apps had broader access to storage.
  • Network APIs: Android 10 adds support for WPA3 for enhanced Wi-Fi security and APIs for working with 5G networks.
  • API for Foldable Devices: Android 10 provides APIs and tools for developing apps for devices with flexible (foldable) screens. Android 9 did not have such specialized support.
  • Security Updates via Google Play: Android 10 introduces Project Mainline, which allows certain system components (related to security and privacy) to be updated via Google Play without waiting for a full system update from the device manufacturer.
  • Privacy Improvements: Besides location permissions and Scoped Storage, Android 10 includes other privacy enhancements, such as restricting access to device identifiers (e.g., IMEI) and automatically generating random MAC addresses for Wi-Fi.
// Example of requesting "while using" location permission in Android 10
// This option was not available in Android 9.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
    ActivityCompat.requestPermissions(
        this,
        arrayOf(Manifest.permission.ACCESS_FINE_LOCATION),
        REQUEST_LOCATION_PERMISSION
    )
} else {
    // Handling for Android 9 and below
}