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

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

  • Upload
    zaloapp

  • View
    971

  • Download
    2

Embed Size (px)

Citation preview

Battery optimization in Android apps

Ngô Thanh Xuyê[email protected]

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

Battery consumption: Why should we care?

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

?

What consumes power?

What consumes power?

Network I/O

Read write/local file database

Sleep/Standby Mode

How can we do better?

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

Read write/local file database

• Memory Caching• Use batch processing

Sleep/Standby mode

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

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

Agilent 34401A Multimeter

• Agilent 34401A Multimeter