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

    View Slide

  2. Start where you are

    View Slide

  3. The global Android
    market
    #DroidconSF
    #ForkAOSP

    View Slide

  4. 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

    View Slide

  5. OHA
    65%
    AOSP
    20%
    Source: ABI Research (August 2014)
    #DroidconSF
    #ForkAOSP

    View Slide

  6. Source: ABI Research (January 2015)

    View Slide

  7. “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)

    View Slide

  8. Android Open Source
    Project (AOSP)
    #DroidconSF
    #ForkAOSP

    View Slide

  9. View Slide

  10. View Slide

  11. View Slide

  12. Android forks
    #DroidconSF
    #ForkAOSP

    View Slide

  13. What is a fork?

    View Slide

  14. View Slide

  15. 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

    View Slide

  16. View Slide

  17. CyanogenMod
    ● Popular AOSP fork
    ● Highly customized and optimized
    ● Strong developer community
    ● Google apps optional
    Cyanogen

    View Slide

  18. Fire OS
    ● Kindle Fire & Fire Phone
    ● Customized interface
    ● Not GMS compatible
    ● Amazon Appstore
    Amazon

    View Slide

  19. MIUI
    ● Most popular mobile OS in China
    ● Google services not available
    ● iOS-like interface
    ● Mi Appstore
    ● International version supports GMS
    Xiaomi

    View Slide

  20. OxygenOS
    ● Replaced CyanogenMod
    ● Similar to vanilla Android
    ● GMS compatible
    OnePlus

    View Slide

  21. SilentOS
    ● Privacy and security
    ● Encrypted data and communication
    ● Spaces
    ● Silent Store
    ● Android for Work
    Silent Circle

    View Slide

  22. Nextbit OS
    ● Cloud storage integration
    ● Smart backup
    ● Clean minimalist design aesthetic
    ● GMS compatible
    Nextbit

    View Slide

  23. Sailfish OS
    ● Nokia MeeGo project
    ● QML (Qt)
    ● Gesture based UI
    ● Not GMS compatible
    Jolla

    View Slide

  24. Google Play services
    ● Announced at Google I/O 2012
    ● Proprietary Google APIs
    ● Client library included in application
    ● Separate APK installed via Play Store
    Google

    View Slide

  25. View Slide

  26. 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

    View Slide

  27. Compatibility Test Suite (CTS)
    ● Automated test suite
    ● Technical and stylistic requirements
    ● Prerequisite for licensing Google Mobile Services (GMS)
    #DroidconSF
    #ForkAOSP

    View Slide

  28. 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

    View Slide

  29. Apps stores
    #DroidconSF
    #ForkAOSP

    View Slide

  30. App Stores
    ● Google Play
    ● Amazon Appstore
    ● Mi App Store
    ● Silent Store
    ● Jolla Store
    ● Yandex.Store
    ● F-Droid
    ● Direct download
    #DroidconSF
    #ForkAOSP

    View Slide

  31. The new fragmentation
    #DroidconSF
    #ForkAOSP

    View Slide

  32. Fragmentation
    Old
    ● Screen size
    ● Display density
    ● Platform version
    New
    ● Forked OS
    ● Proprietary services & APIs
    ● Alternate app stores
    #DroidconSF
    #ForkAOSP

    View Slide

  33. Development strategies
    #DroidconSF
    #ForkAOSP

    View Slide

  34. Development strategies
    1. Alternate dependencies
    2. Product flavors
    3. Core library project
    #DroidconSF
    #ForkAOSP

    View Slide

  35. ● Replace environment-specific dependencies with open
    source alternatives
    ● Bundle all dependencies into your APK
    Alternate dependencies
    Strategy #1
    #DroidconSF
    #ForkAOSP

    View Slide

  36. Component
    ● Maps
    ● Analytics
    ● Location Services
    Project
    ● Mapbox, Tangram
    ● Countly, Adjust
    ● LOST, microG GmsCore
    Alternate dependencies
    Strategy #1
    #DroidconSF
    #ForkAOSP

    View Slide

  37. dependencies {
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.squareup.okhttp:okhttp:2.4.0'
    compile 'com.google.android.gms:play-services-location:8.4.0'
    compile 'com.mapzen.android:lost:1.1.0'
    ...
    }
    https://github.com/mapzen/lost
    Alternate dependencies
    Strategy #1
    #DroidconSF
    #ForkAOSP

    View Slide

  38. 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

    View Slide

  39. 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

    View Slide

  40. src/main/java/Map.java
    public interface Map {
    void buildMap();
    void setLocation(double lon, double lat);
    }
    Product flavors
    Strategy #2
    #DroidconSF
    #ForkAOSP

    View Slide

  41. 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

    View Slide

  42. ● Extract core app logic into library module
    ● Shared dependency across all app versions
    ● Multiple projects -> one APK
    Core library project
    Strategy #3
    #DroidconSF
    #ForkAOSP

    View Slide

  43. dependencies {
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.squareup.okhttp:okhttp:2.4.0'
    compile 'com.yourcompany.android:yourcompany-core:1.0.0'
    ...
    }
    Core library project
    Strategy #3
    #DroidconSF
    #ForkAOSP

    View Slide

  44. Sample app
    #DroidconSF
    #ForkAOSP
    Download
    github.com/ecgreb/fork-aosp

    View Slide

  45. erasermap.com
    github.com/mapzen/eraser-map

    View Slide

  46. View Slide

  47. View Slide

  48. 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

    View Slide

  49. View Slide

  50. Chuck Greb
    Mapzen
    @ecgreb
    #DroidconSF
    #ForkAOSP
    Thank you!
    Forks.
    Fragmentation.
    and the Future of
    Android.

    View Slide