Back to News for Developers

Optimizing and Improving the Android SDK

September 26, 2017ByArt Beatte IV

We've made some important updates to our Android SDK to help keep your mobile apps lean and make it easier to take advantage of our analytics tools.

Today, we're splitting the Android SDK into sub-modules so you only need to add libraries for the features your app uses. This helps developers build accessible, engaging apps with code that's lightweight and efficient.

What does this mean?

By splitting up the Facebook Android SDK, you'll be able to integrate only the features you need. This makes Android apps simpler to develop and reduces app size. Today, the whole SDK is 335K. With this change, an app that only uses Facebook Login can include a 246K library, a 26% reduction in SDK size. Businesses that only use Facebook Analytics will see the largest reduction and only need to include a 52K library, a reduction of 86%.

This change is completely backward-compatible, so you do not need to make any changes to your existing projects.

What does the new SDK look like?

These are the new modules and their respective sizes:

  • Facebook Core (required for Facebook Analytics): 52K
  • Facebook Login: 246K
  • Sharing: 247K
  • Places Graph: 53K
  • Messenger Platform: 91K
  • App Links: 67K
  • Entire SDK: 335K

Each box represents an individual module with its estimated size when included in an app. Sizes shown are not cumulative – for example, implementing Facebook Login is 246K total, not 246K + 50K for Facebook Core.

Note: This estimation is based on using Proguard and an app that supports a single language.

Streamline Facebook Analytics Set-up

As part of our improvements to the Android SDK, we've made it just as easy for developers to set up Facebook Analytics for Android apps as it is for iOS. The Android SDK can now automatically log purchase events, in addition to install, launch, and time spent. This allows you to measure and understand your audience with less manual setup involved. Developers who do not want to automatically log app events can easily opt-out by setting the auto-logging flag to false in their iOS plist or Android manifest XML files.

Get Started

We're putting the power in your hands – and helping you build lean and efficient apps. Find out more and download the latest SDK.