Android O Migration: Lessons Learned
Article Summary
Alizée Camarasa from BlaBlaCar shares hard-won lessons from migrating to Android O. Spoiler: their first solution caused app-wide deadlocks.
When Google mandated Android O (API 26) targeting for all Play Store apps, BlaBlaCar's team had to navigate breaking changes around background execution limits and notification channels. This detailed migration story reveals the technical challenges, failed attempts, and working solutions they discovered.
Key Takeaways
- Background services now crash with IllegalStateException if started while app is backgrounded
- Firebase JobDispatcher caused random ANRs and deadlocks during job scheduling
- Switched to Evernote's AndroidJob library which adapts to different Android versions
- Implicit broadcast receivers in manifest no longer trigger, requiring programmatic registration
- Notification channels let users disable marketing while keeping critical transactional alerts
BlaBlaCar successfully migrated to Android O by converting background services to foreground services for uploads and using AndroidJob for token updates after Firebase JobDispatcher failed.
About This Article
After BlaBlaCar implemented Firebase JobDispatcher, ANRs spiked and trace analysis showed the app was hanging randomly during job scheduling.
The team switched to Evernote's AndroidJob library instead. It picks the right scheduling method for each Android version, using JobScheduler, GcmNetworkManager, or AlarmManager as needed.
AndroidJob's version-aware approach fixed the deadlock problems. BlaBlaCar could then schedule push token updates reliably on all Android O devices without any performance issues.