Posted by Chris Banes, Chief Elf of Android Engineering
Today, we pushed the source code for Google’s Santa Tracker 2018 Android app at google/santa-tracker-android, including its 17 mini-games, Santa tracking feature, Wear app and more!
Visually the app looks much the same this year, but underneath the hood the app has gone on a massive size reduction exercise to make the download from Google Play as small as possible. When a user downloads the app the initial download is now just 9.2MB, compared to last year’s app which was 60MB. That’s a 85% reduction! 🗜️
Android App Bundle
We achieved that reduction by migrating the app over to using an Android App Bundle. The main benefit is that Google Play can now serve dynamically optimized APKs to users’ devices. Moreover, we were also able to separate out all of the games into their own dynamic feature modules, downloaded on demand. This is why you might have seen a progress bar when you first opened a game, we are actually downloading the game from Google Play before starting the game:
The progress bar shown while a game is fetched from Google Play
You can read more about our journey migrating over to App Bundle in a small blog series, starting with our ‘Moving to Android App Bundle‘ post.
One of the new features we added this year was a Gboard sticker pack, allowing users to share stickers to their friends. You might even notice some of the characters from the games in the stickers!
‘Santa Dunk’ is one of the 20 available stickers
We use Firebase App Indexing to publish our stickers to the local index on the device, where the Gboard keyboard app picks them up, allowing the user to share them in apps. You can see the source code here.
The sticker pack being used in a very important conversation
Lots of code improvements
Aside from the things mentioned above, we’ve also completed a number of code health improvements. We have increased the minimum SDK version to Lollipop (21), migrated from the Support Library to AndroidX, reduced the file size of our game assets by switching to modern formats, and lots of other small improvements! Phew 😅.
Go explore the code
If you’re interested go checkout the code and let us know what you think. If you have any questions or issues, please let us know via the issue tracker.
Gurupriyan is a Software Engineer and a technology enthusiast, he’s been working on the field for the last 6 years. Currently focusing on mobile app development and IoT.