BlaBlaCar Alizée Camarasa Mar 28, 2018

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

Critical Insight

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.

The article includes actual code samples showing before/after implementations and explains why their security approach to pending intents needed fixing even before Android O.

About This Article

Problem

After BlaBlaCar implemented Firebase JobDispatcher, ANRs spiked and trace analysis showed the app was hanging randomly during job scheduling.

Solution

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.

Impact

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.