Optimizing Your Apps For Emerging Markets - Droidcon Montreal 2015

Click here to load reader

  • date post

    07-Jan-2017
  • Category

    Mobile

  • view

    1.458
  • download

    0

Embed Size (px)

Transcript of Optimizing Your Apps For Emerging Markets - Droidcon Montreal 2015

PowerPoint Presentation

Optimizing Your Apps For Emerging Markets

#DroidconMtl

[email protected]

2

Emerging MarketsDrive Growth

Source: Mediacells via The Guardian

Source: Mediacells via The Guardian

Smartphone

Feature phone

Multimedia phoneBrazilRussiaIndiaChina

6

1. Optimizing App Size

7

The smaller, the better

8

Color Filters

9

Use Color FilterFaster way to experiment with color schemes.Reduce the number of assets, which in turn reducesthe apk size.Less memory used as the number of assets are reduced.

10

Code

11

Image Optimizations

Color Filters

12

JPEGWEBPPNGGIFLossyLosslessTransparencyAnimation

WebP

No Noticeable Change

PNG24 kbWebP10 kb

14

CompatibilityYou can use the native WebP decoder on 4.2 and later.For lower versions, use libpng to convert to PNG format and then use it in the app.

15

Other LibrariesUse programs like OptiPNG, TruePNG and PNGCrushto significantly reduce the size of PNG images.Use mozjpeg for jpeg images.5-10% size reductionWont cause any visible changes to the images.

16

Remove Unused Content

Image Optimizations

Color Filters

17

Remove Unused ContentUse Resource Shrinking.

18

Code

19

Remove Unused ContentUse Resource Shrinking.Use tools like Lint and ProGuard.Use Android-Unused-Resources jar file if you arestill using Eclipse.

https://code.google.com/p/android-unused-resources/

20

2. Optimizing NetworkCalls

21

Expensive Data Flaky NetworksChallenges

Build for Failure

23

Most efficient way to transfer is to not transfer

24

Image Scaling

25

Appropriate Image SizeStore multiple image sizes on the serverLow-res devices might never need a full resolutionimageMost times the smallest image size is sufficient.

26

Checksum

Image Scaling

28

Client AClient BServerChecksumIDSend File IDTransfer FileCSID

29

Code

30

ChecksumAvoid transfers as much as possible.For file transfers, first compute the md5 checksum and send it to the server to check if it already existson the server. The cost to upload the entire file again can be avoided.

31

Image Scaling

Checksum

Transfer in Blocks

32

Transfer in blocksDo data transfers in blocks.Keep track of the blocks that have been transferredand yet to be transferred.The block size can vary based on the type of connection.

33

Testing for different networks is a pain

34

Testing for different networksFacebook recently open-sourced Augmented Traffic Control (ATC).It is a tool to simulate network conditions.It can simulate 2G, Edge, 3G, and LTE networks.Has multiple profiles for a lot of different countries.

http://facebook.github.io/augmented-traffic-control/

35

3. Optimizing for DifferentPhones

36

Small Screens

Slow Processing

Challenges

Developing for flagshipdevices is easy

38

Year Class

39

Code

https://github.com/facebook/device-year-class

41

Redesign

Year Class

42

RedesignRemove features from low-end devices if they wonthave the best user experience.This could be animations, videos or even functionalities.No feature >>> Bad feature

43

@vinaygaba

Questions?