How is Instagram for Android built?

Instagram is a lovely app. It has a fast and beautiful interface which is a fitting backdrop or canvas for the service it offers, which is the ability for users to share equally stunning photos and videos. I am not much of a photo and video person so this aspect of Instagram doesn’t resonate with me so much. But what impresses me as a developer is how well-built it is. The interface is buttery smooth even on old memory-challenged devices in an age where we struggle with bulky apps like Facebook. I always wonder, “what kind of techniques and tools do they use to build their apps?”.

From using the Android app, I detect differences in the way in which the user interface components behave compared to the stock Android versions. For example, there is a rubber-band effect with the ListView that is not present in the Android SDK’s ListView or RecyclerView. This rubber-band effect is present on iOS ScrollViews but not on Android. Maybe Instagram is trying to maintain feature parity between its iOS and Android app.

This makes me suspect that one of the ways Instagram extracts optimal performance out of its apps is through custom components. It would be awesome to learn about these custom components and how they’re built. I figured a good place to start would be the Instagram Engineering blog. I only recently found out about this blog via a Hacker News post about the use of React Native at Instagram.

That post helped clear up a misconception/rumour that you hear from time to time, that Instagram is built with React Native. Instagram does use React Native for some relatively minor sections of the app but the main most-used parts of the app are implemented with native platform SDK.

Continuing to browse the site, I hit a post that seemed to confirm my theory about the use of custom components. It was an article about their open source IGListKit which is a custom List component that uses a special algorithm to optimize how its data is presented.

The component is only for iOS but I suspect there is probably an unreleased Android version being used internally. In any case, it shows the quality of engineering that Instagram has. Maybe Google and Apple should start poaching these developers so we can get some of this awesomeness from the official SDKs!

In the meantime, I am going back to the Instagram Engineering blog to see if I can glean some answers to the burning question of how Instagram makes such a great Android app.

Leave a Reply