SlideShare a Scribd company logo
1 of 27
Download to read offline
When Microwatts
Are Precious:
Battery Tips for
Wearable Apps
Copyright © 2014 CommonsWare, LLC
The Problem: Power
●

Wearables = Small Batteries
●

●

●

Classic model: battery size proportional to screen
size
Wearables avoid bulk, make problem worse

Slow Improvement Curve
●

Power per unit volume or unit mass getting better

●

Well behind pace of Moore's Law

Copyright © 2014 CommonsWare, LLC
Presentation Terminology
●

Device
●

Runs a mainstream mobile operating system, designed for
multiple form factors
–
–

●

Today: Android, Tizen
Tomorrow: who knows?

Accessory
●

●

●

Runs some dedicated OS
Most/all app logic resides on tethered phone or tablet

Hybrid: dedicated OS, but apps run on wearable

Copyright © 2014 CommonsWare, LLC
Terminology Examples
●

Device
●

●

Omate TrueSmart

●

I'm Watch

●

●

Google Glass

Samsung Gear 2 / Gear 2 Neo

Accessory
●

●

●

SONY SmartWatch/SW2
Samsung Gear Fit

Hybrid
●

Pebble

Copyright © 2014 CommonsWare, LLC
Sources of Power Drain
●

What
●

●

CPU

●

Radios (WiFi, mobile data, Bluetooth, etc.)

●

“Disk” I/O

●

●

Screen

Sensors (accelerometer, camera, GPS, etc.)

Where
●

Wearable

●

Tethered Device (accessory or hybrid)

Copyright © 2014 CommonsWare, LLC
The Real Problem: Time
●

●

Developers Do Not Grow On Trees
Net: Only So Much Development Time
Available for Power Optimization
●

Must also have time for postage-stamp UX,
integrating with tethered app or back-end systems,
and so on

Copyright © 2014 CommonsWare, LLC
The Real Real Problem: Blame
●

Blaming the App
●

●

●

“When I use this app, my wearable's battery life
goes down the tubes”
Effect: poor reviews and ratings

Blaming the Wearable
●

●

“I'm always having to charge this @#%@$*!!! thing”
Effect: depressed market for wearables... and apps
that support wearables

Copyright © 2014 CommonsWare, LLC
Measure Twice, Code Once
●

Ideal: Low-Level Battery Consumption Data
from the Wearable
●

●

Accurate measurement of point-in-time power
consumption
Best if part of the wearable firmware itself,
available via tools
–

…unless you are good with a multimeter and have very
steady hands...

Copyright © 2014 CommonsWare, LLC
Measure Twice, Code Once
●

Less Ideal: Accurate Data for Related Platform
●

Identify device with better battery information with
components of similar style to wearable
–
–

●

Similar: WiFi radios
Dissimilar: screen technology (e-ink/Mirasol vs.
AMOLED)

Measure power drain on the test device, develop
custom heuristics to apply to wearable

Copyright © 2014 CommonsWare, LLC
Measure Twice, Cut Once
●

What Would Be Useful: Advice from
Manufacturers
●

Devices with API changes for dealing with power
–

●

E.g., WIMM One and Internet

General “these things are BAD” recommendations

Copyright © 2014 CommonsWare, LLC
Measure Twice, Cut Once
●

What Really Happens: Learn From Others' Pain
●

Find other people who took measurements, or
otherwise beat their head against various walls
–

Usually by testing smartphone hardware

●

Learn how they coped

●

Implement similar approaches in your app

Copyright © 2014 CommonsWare, LLC
Formal Research
●

●

"How is Energy Consumed in
Smartphone Display
Applications?"

"An Analysis of Power
Consumption in a Smartphone"

Copyright © 2014 CommonsWare, LLC
Power Drain: Screen
●

Component Most Likely to Vary
●

Manufacturer focus on power consumption

●

Radical form factors
–
–

E-ink displays

–
●

Google Glass
No display at all

Phone/tablet analogue: ~10% battery life per hour
of screen time

Copyright © 2014 CommonsWare, LLC
Power Drain: Screen
●

Mitigation
●

Use notification APIs, if offered
–

●

Be careful about overriding screen timeouts
–

●

Versus trying to wake up the device yourself to flash the
screen
Implement your own timeout, if concerned that device
default is too low

Focus on “at a glance” UX
–

Wearables not meant for long-term viewing

Copyright © 2014 CommonsWare, LLC
Power Drain: Internet
●

Expectation vs. Reality
●

Expectation: power drain proportional to bandwidth
used
–

●

As rough analogue to radio time

Reality: cool-down period
–

Full-power radio stays at full power, before going to
low-power, before going to standby

–

Spends many seconds in full- or low-power after you have
stopped transferring

–

Net: additional power drain beyond transfer time

Copyright © 2014 CommonsWare, LLC
Power Drain: Internet
●

Mitigation: Fewer, Bigger Transfers
●

●

●

●

Pre-load likely material, even if not 100% certain will need
Think two-way sync vs. independent upload, download
schedules
Cache and upload periodically versus uploading in real
time
Adjust Web service API
–

Denormalize

–

APIs that request arbitrary collection of stuff

Copyright © 2014 CommonsWare, LLC
Power Drain: Internet
●

Mitigation: Sensible Network Practices
●

GZIP

●

Binary Instead of Text?
–

●

Favor protobuf & Thrift over JSON & XML

Client-side caching
–

ETag, If-Modified-Since, and kin

Copyright © 2014 CommonsWare, LLC
Power Drain: Internet
●

Mitigation: Synchronize With Other Apps
●

●

Try to “warm up” the radios once for all versus
independent behavior
Examples
–

WIMM One

–

Android SyncAdapter

–

Android inexact alarms

Copyright © 2014 CommonsWare, LLC
Power Drain: Local I/O
●

Once Again, Size Matters
●

●

More efficient to do fewer larger I/O operations
than lots of smaller I/O operations for same
amount of data
Probably not a major area of concern for
wearables
–

Usually not dealing with lots of data

–

Exception: images

Copyright © 2014 CommonsWare, LLC
Power Drain: I/O
●

Mitigation
●

Memory caching for reads
–

●

Memory buffering for writes
–

●

For network, two-tier cache where appropriate
Example: logging

Consider I/O optimizing for what the wearable
needs
–

Example: flat file appending vs. database updating

Copyright © 2014 CommonsWare, LLC
Power Drain: CPU
●

Wearables Want to Sleep
●

●

Mobile devices have well-established patterns for
turning off cores or putting entire CPU in sleep
mode

Mitigation: Don't Pester the Wearable
●

●

Device: frequent wakeups for data sync, etc.
Accessory: frequent pushes of content to the
wearable

Copyright © 2014 CommonsWare, LLC
Power Drain: Sensors
●

Amount Depends Upon Sensor
●

●

●

GPS is rather expensive
Camera is expensive, while in use (e.g., AR)

See What Sensors are “Free”
●

Example: accelerometer “always on” for detecting
when watch face should light up

Copyright © 2014 CommonsWare, LLC
Power Drain, Accessory Style
●

Drain on the Accessory
●

●

Updating display contents frequently

Drain on the App (On Tethered Device)
●

Same sorts of stuff as for power drain on wearable
device

Copyright © 2014 CommonsWare, LLC
Adapting for Power Management
●

Check for APIs for Battery Level
●

●

More likely on a device than on an accessory

Alter Behavior as Battery Drops
●

●

Less-frequent updates
Suspend unnecessary overhead (e.g., analytics
logging)

Copyright © 2014 CommonsWare, LLC
UX for Power Management
●

Defaults with Control
●

Steer the user towards power-saving behavior via
sensible defaults
–

●

●

Expectation management

Allow user to “tune” behavior to be more or less
aggressive depending upon wishes
Remember: this is a new space! You may not know
how users will really use your wearable app!
–

Help users understand power implications of
configuration changes

Copyright © 2014 CommonsWare, LLC
Marketing for Power Management
●

●

Objective: Minimize Blame
Approach: Don't Oversell What Will Get You
Blamed
●

Keep marketing material in line with chosen
defaults

Copyright © 2014 CommonsWare, LLC
Side Effects
●

Techniques Help Everywhere!
●

Traditional mobile apps
–

●

Web apps
–

●

Still batteries, just bigger
E.g., reduced transfer time

May Require Server-Side Changes
●

If it's not your server, can you create an app server
that performs aggregation, etc. functions?

Copyright © 2014 CommonsWare, LLC

More Related Content

What's hot

Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot ViewAndroid Development: The 20,000-Foot View
Android Development: The 20,000-Foot ViewCommonsWare
 
Best Practices in Media Playback
Best Practices in Media PlaybackBest Practices in Media Playback
Best Practices in Media PlaybackGDG Korea
 
Droidcon2013 miracast final2
Droidcon2013 miracast final2Droidcon2013 miracast final2
Droidcon2013 miracast final2Droidcon Berlin
 
PhoneGap: Building Mobile Applications with HTML/JS
PhoneGap: Building Mobile Applications with HTML/JSPhoneGap: Building Mobile Applications with HTML/JS
PhoneGap: Building Mobile Applications with HTML/JSRyan Stewart
 
"Open Source licensing and software quality" by Monty Michael Widenius @ eLib...
"Open Source licensing and software quality" by Monty Michael Widenius @ eLib..."Open Source licensing and software quality" by Monty Michael Widenius @ eLib...
"Open Source licensing and software quality" by Monty Michael Widenius @ eLib...eLiberatica
 
The unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in AndroidThe unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in AndroidAlessandro Martellucci
 
Targeting Android with Qt
Targeting Android with QtTargeting Android with Qt
Targeting Android with QtEspen Riskedal
 
Build your cross-platform service in a week with App Engine
Build your cross-platform service in a week with App EngineBuild your cross-platform service in a week with App Engine
Build your cross-platform service in a week with App EngineJl_Ugia
 
Jose l ugia 6 wunderkinder, momenta
Jose l ugia  6 wunderkinder, momentaJose l ugia  6 wunderkinder, momenta
Jose l ugia 6 wunderkinder, momentaapps4allru
 
Should I Build With Open Source Software?
Should I Build With Open Source Software?Should I Build With Open Source Software?
Should I Build With Open Source Software?joelevy1776
 
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapNick Landry
 
Developing Cross platform apps in flutter (Android, iOS, Web)
Developing Cross platform apps in flutter (Android, iOS, Web)Developing Cross platform apps in flutter (Android, iOS, Web)
Developing Cross platform apps in flutter (Android, iOS, Web)Priyanka Tyagi
 
Open Source Jumpstart Tooling Up Intro
Open Source Jumpstart Tooling Up IntroOpen Source Jumpstart Tooling Up Intro
Open Source Jumpstart Tooling Up IntroSkills Matter
 
PhoneGap: a brief history and apologia
PhoneGap: a brief history and apologiaPhoneGap: a brief history and apologia
PhoneGap: a brief history and apologialorinbeer
 
Building Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGapBuilding Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGapSimon MacDonald
 
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...DevClub_lv
 
Why choose flutter 2 over flutter 1
Why choose flutter 2 over flutter 1 Why choose flutter 2 over flutter 1
Why choose flutter 2 over flutter 1 Concetto Labs
 
Week 1 - Android Study Jams
Week 1 - Android Study JamsWeek 1 - Android Study Jams
Week 1 - Android Study JamsJoannaCamille2
 

What's hot (20)

Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot ViewAndroid Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
 
Best Practices in Media Playback
Best Practices in Media PlaybackBest Practices in Media Playback
Best Practices in Media Playback
 
Droidcon2013 miracast final2
Droidcon2013 miracast final2Droidcon2013 miracast final2
Droidcon2013 miracast final2
 
PhoneGap: Building Mobile Applications with HTML/JS
PhoneGap: Building Mobile Applications with HTML/JSPhoneGap: Building Mobile Applications with HTML/JS
PhoneGap: Building Mobile Applications with HTML/JS
 
"Open Source licensing and software quality" by Monty Michael Widenius @ eLib...
"Open Source licensing and software quality" by Monty Michael Widenius @ eLib..."Open Source licensing and software quality" by Monty Michael Widenius @ eLib...
"Open Source licensing and software quality" by Monty Michael Widenius @ eLib...
 
Android part1
Android part1Android part1
Android part1
 
The unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in AndroidThe unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in Android
 
Targeting Android with Qt
Targeting Android with QtTargeting Android with Qt
Targeting Android with Qt
 
Build your cross-platform service in a week with App Engine
Build your cross-platform service in a week with App EngineBuild your cross-platform service in a week with App Engine
Build your cross-platform service in a week with App Engine
 
Jose l ugia 6 wunderkinder, momenta
Jose l ugia  6 wunderkinder, momentaJose l ugia  6 wunderkinder, momenta
Jose l ugia 6 wunderkinder, momenta
 
Should I Build With Open Source Software?
Should I Build With Open Source Software?Should I Build With Open Source Software?
Should I Build With Open Source Software?
 
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
 
Developing Cross platform apps in flutter (Android, iOS, Web)
Developing Cross platform apps in flutter (Android, iOS, Web)Developing Cross platform apps in flutter (Android, iOS, Web)
Developing Cross platform apps in flutter (Android, iOS, Web)
 
Open Source Jumpstart Tooling Up Intro
Open Source Jumpstart Tooling Up IntroOpen Source Jumpstart Tooling Up Intro
Open Source Jumpstart Tooling Up Intro
 
PhoneGap: a brief history and apologia
PhoneGap: a brief history and apologiaPhoneGap: a brief history and apologia
PhoneGap: a brief history and apologia
 
Building Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGapBuilding Native Mobile Applications with PhoneGap
Building Native Mobile Applications with PhoneGap
 
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
 
Why choose flutter 2 over flutter 1
Why choose flutter 2 over flutter 1 Why choose flutter 2 over flutter 1
Why choose flutter 2 over flutter 1
 
Flutter for web
Flutter for webFlutter for web
Flutter for web
 
Week 1 - Android Study Jams
Week 1 - Android Study JamsWeek 1 - Android Study Jams
Week 1 - Android Study Jams
 

Similar to When Microwatts Are Precious: Battery Tips for Wearable Apps

Tuning Android Applications (Part Deux)
Tuning Android Applications (Part Deux)Tuning Android Applications (Part Deux)
Tuning Android Applications (Part Deux)CommonsWare
 
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...NITHIN S.S
 
Performance testing – mobile apps session1
Performance testing – mobile apps   session1Performance testing – mobile apps   session1
Performance testing – mobile apps session1Jyothirmayee Pola
 
Performance testing – mobile apps session1
Performance testing – mobile apps   session1Performance testing – mobile apps   session1
Performance testing – mobile apps session1Jyothirmayee Pola
 
How to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting PerformanceHow to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting Performancerickschwar
 
The Wonderful World of Wearables
The Wonderful World of WearablesThe Wonderful World of Wearables
The Wonderful World of WearablesCommonsWare
 
How to make your app successful with mobile app testing?
How to make your app successful with mobile app testing?How to make your app successful with mobile app testing?
How to make your app successful with mobile app testing?MobilePundits
 
Android Battery optimization Android Apps
Android Battery optimization Android AppsAndroid Battery optimization Android Apps
Android Battery optimization Android AppsSingsys Pte Ltd
 
London Tester Gathering Workshops - Mobile Software Testing - Stephen Janaway
London Tester Gathering Workshops - Mobile Software Testing - Stephen JanawayLondon Tester Gathering Workshops - Mobile Software Testing - Stephen Janaway
London Tester Gathering Workshops - Mobile Software Testing - Stephen JanawayStephen Janaway
 
Understanding, debugging and fixing power bugs
Understanding, debugging and fixing power bugsUnderstanding, debugging and fixing power bugs
Understanding, debugging and fixing power bugslittleeye
 
Self adaptive battery and context aware mobile application development
Self adaptive battery and context aware mobile application developmentSelf adaptive battery and context aware mobile application development
Self adaptive battery and context aware mobile application developmentSoumya Kanti Datta
 
Testing Mobile App Performance
Testing Mobile App PerformanceTesting Mobile App Performance
Testing Mobile App PerformanceTechWell
 
From Android to the Mobile Web
From Android to the Mobile WebFrom Android to the Mobile Web
From Android to the Mobile WebCommonsWare
 
Vivit webinar dec 2010 - Mobile Tipping Point
Vivit webinar   dec 2010 - Mobile Tipping PointVivit webinar   dec 2010 - Mobile Tipping Point
Vivit webinar dec 2010 - Mobile Tipping PointShunra
 
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...IndicThreads
 
Mobile performance testing
Mobile performance testingMobile performance testing
Mobile performance testinghunz
 
The Art of Mobile Performance (Mobiconf 2015)
The Art of Mobile Performance (Mobiconf 2015)The Art of Mobile Performance (Mobiconf 2015)
The Art of Mobile Performance (Mobiconf 2015)David Low
 

Similar to When Microwatts Are Precious: Battery Tips for Wearable Apps (20)

Tuning Android Applications (Part Deux)
Tuning Android Applications (Part Deux)Tuning Android Applications (Part Deux)
Tuning Android Applications (Part Deux)
 
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
 
Performance testing – mobile apps session1
Performance testing – mobile apps   session1Performance testing – mobile apps   session1
Performance testing – mobile apps session1
 
Performance testing – mobile apps session1
Performance testing – mobile apps   session1Performance testing – mobile apps   session1
Performance testing – mobile apps session1
 
How to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting PerformanceHow to Lower Android Power Consumption Without Affecting Performance
How to Lower Android Power Consumption Without Affecting Performance
 
Beyond Traditional Mobile Testing
Beyond Traditional Mobile TestingBeyond Traditional Mobile Testing
Beyond Traditional Mobile Testing
 
The Wonderful World of Wearables
The Wonderful World of WearablesThe Wonderful World of Wearables
The Wonderful World of Wearables
 
How to make your app successful with mobile app testing?
How to make your app successful with mobile app testing?How to make your app successful with mobile app testing?
How to make your app successful with mobile app testing?
 
Android Battery optimization Android Apps
Android Battery optimization Android AppsAndroid Battery optimization Android Apps
Android Battery optimization Android Apps
 
gcce-uapm-slide-20131001-1900
gcce-uapm-slide-20131001-1900gcce-uapm-slide-20131001-1900
gcce-uapm-slide-20131001-1900
 
London Tester Gathering Workshops - Mobile Software Testing - Stephen Janaway
London Tester Gathering Workshops - Mobile Software Testing - Stephen JanawayLondon Tester Gathering Workshops - Mobile Software Testing - Stephen Janaway
London Tester Gathering Workshops - Mobile Software Testing - Stephen Janaway
 
Power bugs
Power bugsPower bugs
Power bugs
 
Understanding, debugging and fixing power bugs
Understanding, debugging and fixing power bugsUnderstanding, debugging and fixing power bugs
Understanding, debugging and fixing power bugs
 
Self adaptive battery and context aware mobile application development
Self adaptive battery and context aware mobile application developmentSelf adaptive battery and context aware mobile application development
Self adaptive battery and context aware mobile application development
 
Testing Mobile App Performance
Testing Mobile App PerformanceTesting Mobile App Performance
Testing Mobile App Performance
 
From Android to the Mobile Web
From Android to the Mobile WebFrom Android to the Mobile Web
From Android to the Mobile Web
 
Vivit webinar dec 2010 - Mobile Tipping Point
Vivit webinar   dec 2010 - Mobile Tipping PointVivit webinar   dec 2010 - Mobile Tipping Point
Vivit webinar dec 2010 - Mobile Tipping Point
 
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
Performance in Android: Tips and Techniques [IndicThreads Mobile Application ...
 
Mobile performance testing
Mobile performance testingMobile performance testing
Mobile performance testing
 
The Art of Mobile Performance (Mobiconf 2015)
The Art of Mobile Performance (Mobiconf 2015)The Art of Mobile Performance (Mobiconf 2015)
The Art of Mobile Performance (Mobiconf 2015)
 

More from CommonsWare

The Action Bar: Front to Back
The Action Bar: Front to BackThe Action Bar: Front to Back
The Action Bar: Front to BackCommonsWare
 
Mastering the Master Detail Pattern
Mastering the Master Detail PatternMastering the Master Detail Pattern
Mastering the Master Detail PatternCommonsWare
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful ThreadingCommonsWare
 
Maps V2... And You!
Maps V2... And You!Maps V2... And You!
Maps V2... And You!CommonsWare
 
A Deep Dive Into ViewPager
A Deep Dive Into ViewPagerA Deep Dive Into ViewPager
A Deep Dive Into ViewPagerCommonsWare
 
Integrate Android Apps and Web Apps
Integrate Android Apps and Web AppsIntegrate Android Apps and Web Apps
Integrate Android Apps and Web AppsCommonsWare
 
Securing User Data with SQLCipher
Securing User Data with SQLCipherSecuring User Data with SQLCipher
Securing User Data with SQLCipherCommonsWare
 
Beaming Data to Devices with NFC
Beaming Data to Devices with NFCBeaming Data to Devices with NFC
Beaming Data to Devices with NFCCommonsWare
 
What's New in Jelly Bean
What's New in Jelly BeanWhat's New in Jelly Bean
What's New in Jelly BeanCommonsWare
 
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business ModelsMaking Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business ModelsCommonsWare
 
AppsWorld Keynote
AppsWorld KeynoteAppsWorld Keynote
AppsWorld KeynoteCommonsWare
 
App Integration (Revised and Updated)
App Integration (Revised and Updated)App Integration (Revised and Updated)
App Integration (Revised and Updated)CommonsWare
 
Rich Text Editing and Beyond
Rich Text Editing and BeyondRich Text Editing and Beyond
Rich Text Editing and BeyondCommonsWare
 
App integration: Strategies and Tactics
App integration: Strategies and TacticsApp integration: Strategies and Tactics
App integration: Strategies and TacticsCommonsWare
 
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and TacticsBackwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and TacticsCommonsWare
 
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... OddAndroid Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... OddCommonsWare
 
Google TV For Fun
Google TV For FunGoogle TV For Fun
Google TV For FunCommonsWare
 
If I Were Starting Now
If I Were Starting NowIf I Were Starting Now
If I Were Starting NowCommonsWare
 
Tuning Android Applications (Part One)
Tuning Android Applications (Part One)Tuning Android Applications (Part One)
Tuning Android Applications (Part One)CommonsWare
 

More from CommonsWare (20)

The Action Bar: Front to Back
The Action Bar: Front to BackThe Action Bar: Front to Back
The Action Bar: Front to Back
 
Mastering the Master Detail Pattern
Mastering the Master Detail PatternMastering the Master Detail Pattern
Mastering the Master Detail Pattern
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful Threading
 
Maps V2... And You!
Maps V2... And You!Maps V2... And You!
Maps V2... And You!
 
A Deep Dive Into ViewPager
A Deep Dive Into ViewPagerA Deep Dive Into ViewPager
A Deep Dive Into ViewPager
 
Integrate Android Apps and Web Apps
Integrate Android Apps and Web AppsIntegrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
 
X Means Y
X Means YX Means Y
X Means Y
 
Securing User Data with SQLCipher
Securing User Data with SQLCipherSecuring User Data with SQLCipher
Securing User Data with SQLCipher
 
Beaming Data to Devices with NFC
Beaming Data to Devices with NFCBeaming Data to Devices with NFC
Beaming Data to Devices with NFC
 
What's New in Jelly Bean
What's New in Jelly BeanWhat's New in Jelly Bean
What's New in Jelly Bean
 
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business ModelsMaking Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
 
AppsWorld Keynote
AppsWorld KeynoteAppsWorld Keynote
AppsWorld Keynote
 
App Integration (Revised and Updated)
App Integration (Revised and Updated)App Integration (Revised and Updated)
App Integration (Revised and Updated)
 
Rich Text Editing and Beyond
Rich Text Editing and BeyondRich Text Editing and Beyond
Rich Text Editing and Beyond
 
App integration: Strategies and Tactics
App integration: Strategies and TacticsApp integration: Strategies and Tactics
App integration: Strategies and Tactics
 
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and TacticsBackwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and Tactics
 
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... OddAndroid Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... Odd
 
Google TV For Fun
Google TV For FunGoogle TV For Fun
Google TV For Fun
 
If I Were Starting Now
If I Were Starting NowIf I Were Starting Now
If I Were Starting Now
 
Tuning Android Applications (Part One)
Tuning Android Applications (Part One)Tuning Android Applications (Part One)
Tuning Android Applications (Part One)
 

Recently uploaded

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 

When Microwatts Are Precious: Battery Tips for Wearable Apps

  • 1. When Microwatts Are Precious: Battery Tips for Wearable Apps Copyright © 2014 CommonsWare, LLC
  • 2. The Problem: Power ● Wearables = Small Batteries ● ● ● Classic model: battery size proportional to screen size Wearables avoid bulk, make problem worse Slow Improvement Curve ● Power per unit volume or unit mass getting better ● Well behind pace of Moore's Law Copyright © 2014 CommonsWare, LLC
  • 3. Presentation Terminology ● Device ● Runs a mainstream mobile operating system, designed for multiple form factors – – ● Today: Android, Tizen Tomorrow: who knows? Accessory ● ● ● Runs some dedicated OS Most/all app logic resides on tethered phone or tablet Hybrid: dedicated OS, but apps run on wearable Copyright © 2014 CommonsWare, LLC
  • 4. Terminology Examples ● Device ● ● Omate TrueSmart ● I'm Watch ● ● Google Glass Samsung Gear 2 / Gear 2 Neo Accessory ● ● ● SONY SmartWatch/SW2 Samsung Gear Fit Hybrid ● Pebble Copyright © 2014 CommonsWare, LLC
  • 5. Sources of Power Drain ● What ● ● CPU ● Radios (WiFi, mobile data, Bluetooth, etc.) ● “Disk” I/O ● ● Screen Sensors (accelerometer, camera, GPS, etc.) Where ● Wearable ● Tethered Device (accessory or hybrid) Copyright © 2014 CommonsWare, LLC
  • 6. The Real Problem: Time ● ● Developers Do Not Grow On Trees Net: Only So Much Development Time Available for Power Optimization ● Must also have time for postage-stamp UX, integrating with tethered app or back-end systems, and so on Copyright © 2014 CommonsWare, LLC
  • 7. The Real Real Problem: Blame ● Blaming the App ● ● ● “When I use this app, my wearable's battery life goes down the tubes” Effect: poor reviews and ratings Blaming the Wearable ● ● “I'm always having to charge this @#%@$*!!! thing” Effect: depressed market for wearables... and apps that support wearables Copyright © 2014 CommonsWare, LLC
  • 8. Measure Twice, Code Once ● Ideal: Low-Level Battery Consumption Data from the Wearable ● ● Accurate measurement of point-in-time power consumption Best if part of the wearable firmware itself, available via tools – …unless you are good with a multimeter and have very steady hands... Copyright © 2014 CommonsWare, LLC
  • 9. Measure Twice, Code Once ● Less Ideal: Accurate Data for Related Platform ● Identify device with better battery information with components of similar style to wearable – – ● Similar: WiFi radios Dissimilar: screen technology (e-ink/Mirasol vs. AMOLED) Measure power drain on the test device, develop custom heuristics to apply to wearable Copyright © 2014 CommonsWare, LLC
  • 10. Measure Twice, Cut Once ● What Would Be Useful: Advice from Manufacturers ● Devices with API changes for dealing with power – ● E.g., WIMM One and Internet General “these things are BAD” recommendations Copyright © 2014 CommonsWare, LLC
  • 11. Measure Twice, Cut Once ● What Really Happens: Learn From Others' Pain ● Find other people who took measurements, or otherwise beat their head against various walls – Usually by testing smartphone hardware ● Learn how they coped ● Implement similar approaches in your app Copyright © 2014 CommonsWare, LLC
  • 12. Formal Research ● ● "How is Energy Consumed in Smartphone Display Applications?" "An Analysis of Power Consumption in a Smartphone" Copyright © 2014 CommonsWare, LLC
  • 13. Power Drain: Screen ● Component Most Likely to Vary ● Manufacturer focus on power consumption ● Radical form factors – – E-ink displays – ● Google Glass No display at all Phone/tablet analogue: ~10% battery life per hour of screen time Copyright © 2014 CommonsWare, LLC
  • 14. Power Drain: Screen ● Mitigation ● Use notification APIs, if offered – ● Be careful about overriding screen timeouts – ● Versus trying to wake up the device yourself to flash the screen Implement your own timeout, if concerned that device default is too low Focus on “at a glance” UX – Wearables not meant for long-term viewing Copyright © 2014 CommonsWare, LLC
  • 15. Power Drain: Internet ● Expectation vs. Reality ● Expectation: power drain proportional to bandwidth used – ● As rough analogue to radio time Reality: cool-down period – Full-power radio stays at full power, before going to low-power, before going to standby – Spends many seconds in full- or low-power after you have stopped transferring – Net: additional power drain beyond transfer time Copyright © 2014 CommonsWare, LLC
  • 16. Power Drain: Internet ● Mitigation: Fewer, Bigger Transfers ● ● ● ● Pre-load likely material, even if not 100% certain will need Think two-way sync vs. independent upload, download schedules Cache and upload periodically versus uploading in real time Adjust Web service API – Denormalize – APIs that request arbitrary collection of stuff Copyright © 2014 CommonsWare, LLC
  • 17. Power Drain: Internet ● Mitigation: Sensible Network Practices ● GZIP ● Binary Instead of Text? – ● Favor protobuf & Thrift over JSON & XML Client-side caching – ETag, If-Modified-Since, and kin Copyright © 2014 CommonsWare, LLC
  • 18. Power Drain: Internet ● Mitigation: Synchronize With Other Apps ● ● Try to “warm up” the radios once for all versus independent behavior Examples – WIMM One – Android SyncAdapter – Android inexact alarms Copyright © 2014 CommonsWare, LLC
  • 19. Power Drain: Local I/O ● Once Again, Size Matters ● ● More efficient to do fewer larger I/O operations than lots of smaller I/O operations for same amount of data Probably not a major area of concern for wearables – Usually not dealing with lots of data – Exception: images Copyright © 2014 CommonsWare, LLC
  • 20. Power Drain: I/O ● Mitigation ● Memory caching for reads – ● Memory buffering for writes – ● For network, two-tier cache where appropriate Example: logging Consider I/O optimizing for what the wearable needs – Example: flat file appending vs. database updating Copyright © 2014 CommonsWare, LLC
  • 21. Power Drain: CPU ● Wearables Want to Sleep ● ● Mobile devices have well-established patterns for turning off cores or putting entire CPU in sleep mode Mitigation: Don't Pester the Wearable ● ● Device: frequent wakeups for data sync, etc. Accessory: frequent pushes of content to the wearable Copyright © 2014 CommonsWare, LLC
  • 22. Power Drain: Sensors ● Amount Depends Upon Sensor ● ● ● GPS is rather expensive Camera is expensive, while in use (e.g., AR) See What Sensors are “Free” ● Example: accelerometer “always on” for detecting when watch face should light up Copyright © 2014 CommonsWare, LLC
  • 23. Power Drain, Accessory Style ● Drain on the Accessory ● ● Updating display contents frequently Drain on the App (On Tethered Device) ● Same sorts of stuff as for power drain on wearable device Copyright © 2014 CommonsWare, LLC
  • 24. Adapting for Power Management ● Check for APIs for Battery Level ● ● More likely on a device than on an accessory Alter Behavior as Battery Drops ● ● Less-frequent updates Suspend unnecessary overhead (e.g., analytics logging) Copyright © 2014 CommonsWare, LLC
  • 25. UX for Power Management ● Defaults with Control ● Steer the user towards power-saving behavior via sensible defaults – ● ● Expectation management Allow user to “tune” behavior to be more or less aggressive depending upon wishes Remember: this is a new space! You may not know how users will really use your wearable app! – Help users understand power implications of configuration changes Copyright © 2014 CommonsWare, LLC
  • 26. Marketing for Power Management ● ● Objective: Minimize Blame Approach: Don't Oversell What Will Get You Blamed ● Keep marketing material in line with chosen defaults Copyright © 2014 CommonsWare, LLC
  • 27. Side Effects ● Techniques Help Everywhere! ● Traditional mobile apps – ● Web apps – ● Still batteries, just bigger E.g., reduced transfer time May Require Server-Side Changes ● If it's not your server, can you create an app server that performs aggregation, etc. functions? Copyright © 2014 CommonsWare, LLC