Sobes.tech
Junior

What is the difference between Android 4 and Android 5?

sobes.tech AI

Answer from AI

Architectural changes (ART instead of Dalvik), Material Design, improved notifications, multi-user mode (for tablets), Project Volta (battery performance improvements).

Main differences:

  • Virtual Machine: Android 5 switched from Dalvik to ART (Android Runtime). ART provides ahead-of-time (AOT) compilation, resulting in faster app execution, better memory usage, and smoother UI performance compared to JIT (Just-In-Time) compilation in Dalvik.
  • Design: Material Design was introduced. This new design language emphasizes shadows, animations, typography, and cards, making the interface more modern and intuitive.
  • Notifications: The notification system was improved. Heads-up notifications now appear over the current app, interactions with notifications on the lock screen are possible, and notifications can be grouped.
  • Performance and Battery Efficiency: Project Volta aims to improve battery life. New APIs like JobScheduler allow deferring tasks under favorable conditions (e.g., Wi-Fi connection or charging).
  • Multi-user Mode: Support for creating multiple user profiles was added for tablets.
  • Unlocking: Smart Lock was introduced, allowing devices to remain unlocked under certain conditions (e.g., connected to trusted Bluetooth devices or in trusted locations).
  • Security: Enhanced support for SELinux (Security-Enhanced Linux) in Enforcing mode.

Comparison table:

Aspect Android 4.x (KitKat) Android 5.0+ (Lollipop)
Virtual Machine Dalvik (JIT) ART (AOT)
Design Holo Material Design
Notifications Standard Heads-up, lock screen notifications
Power Efficiency Basic Project Volta
Multi-user Support Only for separate devices (non-system) System support for tablets
Lock Screen Pin, Pattern, Password, Face unlock Smart Lock added
SELinux Permissive Enforcing

ART Compilation:

// In Dalvik, code was compiled at runtime
// In ART, code is compiled during app installation,
// which speeds up startup and execution