Sunteți pe pagina 1din 22

Building

Apps for
Billions
-

Nishant Srivastava

Hello, my name is

Nishant Srivastava

Software Engineer @Omni Labs, Inc.

Lead Organizer @Google Developer Group,New Delhi

Blog : Crushing C.O.D.E [ www.crushingcode.co ]

Twitter : @nisrulz

Github : https://github.com/nisrulz

About.me

Daily Challenges

Complex UI/UX

Low end and different devices

Poor Infrastructure

Problem : Your user cry when using your app as the UI is very complex

Simplify
UI/UX

Use colors well


Use icons with text
Keep interactions minimal
Include localization
Make app UI responsive
and fast

Seamless
Connectivity

Optimize Images
1. Serve webp
2. Dynamic Image sizes
3. Use image loading libraries such as
Glide, Picasso, etc.
4. Cache images

Problem : We all hate slow internet...to a point ...

Seamless
Connectivity

Finetune Transfer
Prioritize bandwidth
Detect network changes
Detect Network speed and change
behaviour using that information
Make app useable when offline
Use Stetho tool by Facebook to help
you do analysis.

Seamless
Connectivity

Network Connection Class


Listen to current network traffic in the app
and categorize the quality of the network.
Developed by Facebook.
https://github.com/facebook/network-con
nection-class

Seamless
Connectivity

EasyDeviceInfo
https://github.com/nisrulz/easydeviceinfo

Get network type by using


easyNetworkMod.getNetworkType();

..to get what kind of a network it is


1. Wifi/WifiMax
2. Cellular - 2G/3G/4G

Problem :
...when some
app finished
up all your
data and you
are only
halfway
through the
month...

Conserve Data
Usage

Reduce your app size


to reduce data costs
Offer configurable
network usage. i.e
Download only over
unmetered network

t
n
e
t
n
o
C
t
h
Rig
t
x
e
t
n
o
c
t
h
g
for ri

Download
content which is
visible,
actionable and
only when it is
required.

Problem :
...when you try
to code for just
one type of
device ...

Optimize
for
Devices

Support varying screen


sizes
Backward Compatible
Efficient memory usage
Less CPU hogging

Problem : When you see that Low Battery warning ....

Reduce battery
consumption

Reduce background tasks when


device is running on battery
power
Avoid holding wakelocks.
Batch networking calls
-Use GCM Network Manager
Manage GPS via
FusedLocationProvider
Minimise sensor usage and
updates

EasyDeviceInfo
Reduce battery
consumption

https://github.com/nisrulz/easydeviceinfo

Get battery status via the EasyBatteryMod


easyNetworkMod.getBatteryPercentage();
easyNetworkMod.isDeviceCharging();
easyNetworkMod.getChargingSource();

..to make a better decision as to when you


need to run your jobs..

Reduce battery
consumption

Use Battery Historian to benchmark


battery usage

More detailed information in my other presentation here

..and when
you still
have
battery left
towards the
end of the
day..

References
https://android-developers.blogspot.in/2016/06/building-for-billions.html
https://developer.android.com/distribute/essentials/quality/billions.html#conn
ectivity

S-ar putea să vă placă și