Facebook Launches 3 New Open-Source Tools For Android Developers

Most of Facebook’s announcements at its F8 developer conference this week were iOS-centric, but today, the company also released three new open source tools for Android developers.

The first is a performance segmentation library called Year Class that is meant to help developers quickly figure out what kind of device a user is running. Thanks to this, a developer can quickly tune an app for an older device by turning on some advanced animations, for example, or enable fancier features for more modern phones. For the most part, the tools use CPU speed, as well as the number of available cores and RAM to determine the “year class” of a given device.


The second new tool, Network Connection Class, does something similar, but for network connections. Turns out, just knowing that a user is on an HSPA connection doesn’t actually tell you all that much about the actual network speed. According to Facebook, the speed of HSPA connection can vary by 5x between networks, for example.

Using this new tool, developers can get a better idea of the kind of speeds their users are getting on their networks and tune their apps accordingly. Unlike Year Class, though, this takes a little bit more coding to set up, and the tool obviously has to first gather some data before you can actually tune your app according to the actual network speeds the user is getting.


The third tool, Fresco, is a new image library for Android apps. The idea here is to ensure that apps don’t run out of memory when they load multiple images by being smarter about memory management (those GIFs can get huge, after all) and streaming images when possible.

The system also handles basic functions like displaying placeholders and image caching. You can find the technical details about how exactly this works here.