Top Banner
Battery optimization in Android apps Ngô Thanh Xuyên [email protected]
14

How to deal with high performance and battery issues in android programming

Apr 11, 2017

Download

Technology

Zalo_app
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: How to deal with high performance and battery issues in android programming

Battery optimization in Android apps

Ngô Thanh Xuyê[email protected]

Page 2: How to deal with high performance and battery issues in android programming

• Battery consumption: Why should we care?• What consumes power?• How can we do better?

Page 3: How to deal with high performance and battery issues in android programming

Battery consumption: Why should we care?

Page 4: How to deal with high performance and battery issues in android programming

Xuyên. Sao app hao pin

vậy em?

App gì hao pin quá vậy hả? Gỡ app

Anh ơi! Sao app hao pin vậy anh. Em

thích app anh lắm. Nhưng chắc em dùng app khác

?

Page 5: How to deal with high performance and battery issues in android programming

What consumes power?

Page 6: How to deal with high performance and battery issues in android programming

What consumes power?

Network I/O

Read write/local file database

Sleep/Standby Mode

Page 7: How to deal with high performance and battery issues in android programming

How can we do better?

Page 8: How to deal with high performance and battery issues in android programming

Network I/O

• Open connection• Avoid polling and use TCP persistent connections• Avoid multiple connections

• Data• Data format• Compression

• Network Optimization• Network parameters• Connection policy

Page 9: How to deal with high performance and battery issues in android programming

Read write/local file database

• Memory Caching• Use batch processing

Page 10: How to deal with high performance and battery issues in android programming

Sleep/Standby mode

Page 11: How to deal with high performance and battery issues in android programming

How can we do better?

• Monitoring the Battery Level and Charging State• Determine the Current Charging State• Monitor Changes in Charging State• Use coarse network location

Page 12: How to deal with high performance and battery issues in android programming

AT&T Application Resource Optimizer (ARO)

AT&T ARO has two components:• ARO Data Collector:

• Captures the data traffic of a mobile device and stores that information in trace files

• ARO Data Analyzer: • Evaluates trace data and generates statistical and analytical results based on

recommended best practices

• https://developer.att.com

Page 13: How to deal with high performance and battery issues in android programming

Agilent 34401A Multimeter

• Agilent 34401A Multimeter

Page 14: How to deal with high performance and battery issues in android programming