Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Forks, Fragmentation, and the Future of Android

Forks, Fragmentation, and the Future of Android

Android powers more than 80% of smartphones worldwide and shipped on over 1 billion devices in 2014. However the hidden story in these numbers is that Android forks now account for over 20% of the global Android ecosystem and 41% of new devices. Early on “fragmentation" was an issue of screen size, display density, and platform version. The new “fragmentation” is forked versions of the OS, proprietary APIs, and alternate app stores. This talk explores the Android Open Source Project (AOSP) and popular forks like Cyanogen, FireOS, and MIUI, as well as Google Play Services (Google’s fork of Android). We introduce specific strategies to help developers reach a wider audience with their applications.

Chuck Greb

March 18, 2016
Tweet

More Decks by Chuck Greb

Other Decks in Technology

Transcript

  1. Forks. Fragmentation. and the Future of Android. Chuck Greb Mapzen

    @ecgreb Download github.com/ecgreb/fork-aosp #DroidconSF #ForkAOSP
  2. Global smartphone sales (2014) Operating System Units (Thousands) Market Share

    (%) Android 1,004,675 80.7 iOS 191,426 15.4 Windows 35,133 2.8 Blackberry 7,911 0.6 Other 5,745 0.5 Source: Gartner (March 2015) #DroidconSF #ForkAOSP
  3. “Chinese and Indian vendors accounted for the majority of smartphone

    shipments for the first time with 51% share. While many of these manufacturers are low cost, some are making inroads in the mid-tier, including Xiaomi and Gionee, hence the growing challenge to Samsung in particular.” Source: ABI Research (January 2015)
  4. What is a fork? • Modified OS based on AOSP

    • A “skin” is a type of fork • Greater degree of customization • May not be compatible with Google Mobile Services (GMS) #DroidconSF #ForkAOSP
  5. CyanogenMod • Popular AOSP fork • Highly customized and optimized

    • Strong developer community • Google apps optional Cyanogen
  6. Fire OS • Kindle Fire & Fire Phone • Customized

    interface • Not GMS compatible • Amazon Appstore Amazon
  7. MIUI • Most popular mobile OS in China • Google

    services not available • iOS-like interface • Mi Appstore • International version supports GMS Xiaomi
  8. SilentOS • Privacy and security • Encrypted data and communication

    • Spaces • Silent Store • Android for Work Silent Circle
  9. Nextbit OS • Cloud storage integration • Smart backup •

    Clean minimalist design aesthetic • GMS compatible Nextbit
  10. Sailfish OS • Nokia MeeGo project • QML (Qt) •

    Gesture based UI • Not GMS compatible Jolla
  11. Google Play services • Announced at Google I/O 2012 •

    Proprietary Google APIs • Client library included in application • Separate APK installed via Play Store Google
  12. Google Play services • Google Analytics • Google Cloud Messaging

    (GCM) • Sign in with Google • Location services • Activity Recognition • Maps • In-App Billing • AdMob • Android Pay • and more... #DroidconSF #ForkAOSP
  13. Compatibility Test Suite (CTS) • Automated test suite • Technical

    and stylistic requirements • Prerequisite for licensing Google Mobile Services (GMS) #DroidconSF #ForkAOSP
  14. Advantages Disadvantages Google Play services • Powerful features • Newest

    APIs • Independent updates via Google Play store • Closed source • Large footprint • Not available on all devices #DroidconSF #ForkAOSP
  15. App Stores • Google Play • Amazon Appstore • Mi

    App Store • Silent Store • Jolla Store • Yandex.Store • F-Droid • Direct download #DroidconSF #ForkAOSP
  16. Fragmentation Old • Screen size • Display density • Platform

    version New • Forked OS • Proprietary services & APIs • Alternate app stores #DroidconSF #ForkAOSP
  17. • Replace environment-specific dependencies with open source alternatives • Bundle

    all dependencies into your APK Alternate dependencies Strategy #1 #DroidconSF #ForkAOSP
  18. Component • Maps • Analytics • Location Services Project •

    Mapbox, Tangram • Countly, Adjust • LOST, microG GmsCore Alternate dependencies Strategy #1 #DroidconSF #ForkAOSP
  19. Product flavors • Unique build type for each environment •

    Common interface for flavor specific components • Selectively include dependencies • One project -> multiple APKs Strategy #2 #DroidconSF #ForkAOSP
  20. android { buildTypes { productFlavors { google { ... }

    tangram { ... } } } } dependencies { googleCompile 'com.google.android.gms:play-services-maps:8.4.0' tangramCompile 'com.mapzen.tangram:tangram:0.1-SNAPSHOT' } Product flavors Strategy #2 #DroidconSF #ForkAOSP
  21. src/main/java/Map.java public interface Map { void buildMap(); void setLocation(double lon,

    double lat); } Product flavors Strategy #2 #DroidconSF #ForkAOSP
  22. src/google/java/MapImpl.java public class GoogleMap implements Map { @Override public void

    buildMap() { ... } @Override public void setLocation(double lon, double lat) { ... } } src/tangram/java/MapImpl.java public class TangramMap implements Map { @Override public void buildMap() { ... } @Override public void setLocation(double lon, double lat) { ... } } Product flavors Strategy #2 #DroidconSF #ForkAOSP
  23. • Extract core app logic into library module • Shared

    dependency across all app versions • Multiple projects -> one APK Core library project Strategy #3 #DroidconSF #ForkAOSP
  24. The Future of Android? • Will Android remain the dominant

    smartphone platform? • Will AOSP forks continue to grow in popularity? • Will Google remain the dominant force behind Android? • Will it become easier or more difficult for Android developers to target all markets and all devices with their applications? #DroidconSF #ForkAOSP