Thursday, September 21, 2017
Getting Santa Tracker Into Shape
Getting Santa Tracker Into Shape
Posted by Sam Stern, Developer Programs Engineer
Santa Tracker is a holiday tradition at Google. In addition to bringing seasonal joy to millions of users around the world, its a yearly testing ground for the latest APIs and techniques in app development. Thats why the full source of the app is released on Github every year.
In 2016, the Santa team challenged itself to introduce new content to the app while also making it smaller and more efficient than ever before. In this post, you can read about the road to a more slimmer, faster Santa Tracker.
APK Bloat
Santa Tracker has grown over the years to include the visual and audio assets for over a dozen games and interactive scenes. In 2015, the Santa Tracker APK size was 66.1 MB.
The Android Studio APK analyzer is a great tool to investigate what made the 2015 app so large.

First, while the APK size is 66.1 MB, we see that the download size is 59.5MB! The majority of that size is in the resources folder, but assets and native libraries contribute a sizable piece.
The 2016 app contains everything that was in the 2015 app while adding four completely new games. At first, we assumed that making the app smaller while adding all of that would be impossible, but (spoiler alert!) here are the final results for 2016:

The download size for the app is now nearly 10MB smaller despite the addition of four new games and a visual refresh. The rest of this section will explore how we got there.
Multiple APK Support on Google Play with APK Splits
The 2015 app added the "Snowdown" game by Googles Fun Propulsion Labs team. This game is written in C++, so its included in Santa Tracker as a native library. The team gave us compiled libraries for armv5, armv7, and x86 architectures. Each version was about 3.5MB, which adds up to the 10.5MB you see in the lib entry for the 2015 APK.
Since each device is only using one of these architectures, two thirds of the native libraries could be removed to save space - the tradeoff here is that we�ll publish multiple APKs. The Android gradle build system has native support for building an APK for each architecture (ABI) with only a few lines of configuration in the apps build.gradle file:
ext.abiList = [armeabi, armeabi-v7a, x86] android { // ... splits { abi { // Enable ABI splits enable true // Include the three architectures that we support for snowdown reset() include(*abiList) // Also build a "universal" APK that will run on any device universalApk true } } } |
Once splits are enabled, each split needs to be given a unique version code so that they can co-exist in the Play Store:
// Generate unique versionCodes for each APK variant: ZXYYSSSSS // Z is the Major version number // X is the Minor version number // YY is the Patch version number // SSSS is information about the split (default to 0000) // Any new variations get added to the front import com.android.build.OutputFile; android.applicationVariants.download file now Tuesday, August 8, 2017Nokia admits Brits just arent that into Windows PhoneNokia admits Brits just arent that into Windows PhoneNokia admits Brits just arent that into Windows Phone
Mobile Phones Nokia has confirmed its struggling to get Brits interested in Window Phones, but apparently the once-mighty Finn is having more luck flogging Lumias across the pond -- presumably because Microsoft has a pretty sizeable fan-base in its home country. In a statement, accompanying its first quarter results for 2012, Nokia CEO Stephen Elop said, "We have launched four Lumia devices ahead of schedule to encouraging awards and popular acclaim. The actual sales results have been mixed. We exceeded expectations in markets including the United States, but establishing momentum in certain markets including the UK has been more challenging." Nokia revealed it sold 11.9 million smart phones in the quarter, down 51 per cent on the same period a year ago, and 70.8 million feature phones, down 16 per cent on the same quarter last year. The transition to Windows Phone continues to bite chunks out of the Finnish giants bottom line. Nokia made a whopping loss of �1.3bn in Q1, on revenue of �7.4bn -- 3 billion fewer euros than it had pouring into its coffers a year ago. "We are navigating through a significant company transition in an industry environment that continues to evolve and shift quickly," said Elop, putting himself forward for Understatement of the Year award 2012. "Over the last year we have made progress on our new strategy, but we have faced greater than expected competitive challenges." The former Microsoft exec turned Nokia head honcho also conceded that times are tough at the budget end of Nokias mobile portfolio -- doubtless because Android continues to batter down the price of budget phones, even as its ups their specs. "The lower price tiers of our industry are undergoing a structural change, and traditional feature phones are challenged by full touch devices," said Elop -- for full touch devices read Android phones. Elop said Nokia will continue to invest in its Series 40 platform -- which is used on its Asharange of not-entirely-smart-phones. Expect some new Ashas to arrive in Q2, Elop added. Commenting on the results via Twitter, Adam Leach, analyst at Ovum, said: "Nokia is continuing to be burnt at both ends of the candle, losing share at the low-end as well as the high-end." Leach anticipates "still worse to come through this year before Lumia starts picking up momentum". "Nokia needs Lumia to build serious momentum this year," he added. Nokias results also reveal it was paid $250m by Microsoft in Q1 in "platform support payments". Nokia said it expects to get "billions of US dollars" in payments from Microsoft for platform support and software royalties over the lifetime of the pairs alliance. Nokia also revealed that Colin Giles, its executive vice president of sales who has been with the company for two decades, will leave at the end of June -- to be "closer to his family". download file now Monday, March 30, 2015Lollipop for Samsung Galaxy S5 rolls further into Europe – Android WorldLollipop Android 5.0 for the Samsung Galaxy S5 is a long awaited update and the manufacturer has continued to roll. Unfortunately not in the Netherlands, but the Spanish Galaxy S5 owners can now update. Lollipop on Galaxy S5Android 5.0 brings many improvements to several areas. The device quickly by using ART is, notifications have been addressed and we see that the new Material Design is implemented everywhere. Samsung has here own sauce over done with an updated version of TouchWiz and is again made entirely Samsung own. The update has been rolled out in Poland, but according SamMobile is now Spain’s turn. Users with a Samsung Galaxy S5 from this country, get the update via Kies and OTA in on their device. Netherlands and BelgiumA concrete date for the Netherlands and Belgium, there is not, but given the fact that Samsung will continue with the rollout in Spain, it seems that the software is considered successful. This could mean that the update to Android 5.0 for the Samsung Galaxy S5 also may be soon to expect from us. For a complete overview of the updates to Android 5.0 we refer to this list. Spelling errors, grammatical mistakes or factual errors discovered? Send an email to the author of this article! Ruud CarisFounder Androidworld.nl, gadget lover, Redbull drinker and Android enthusiast. Started with the ADP1 now include Nexus 5 Nexus 7, Nexus and Google Glass.
Subscribe to:
Posts (Atom)
|