WEBIST14, Barcelona, 4 April 2014
Evaluating impact of cross-platform frameworks
in energy consumption of mobile application
Matteo Ciman and Ombretta GaggiDepartment of Mathematics
University of Padua, Italy{mciman, gaggi}@math.unipd.it
WEBIST14 – 10th International Conference on Web Information Systems and Technologies
Smartphones equipment
Smartphones equipped with ample set of sensors
WEBIST14, Barcelona, 4 April 2014 2 of 22
Mobile Sensing
Data from sensors used for several purposes Activity recognition Mobile healthcare Augmented reality
WEBIST14, Barcelona, 4 April 2014 3 of 22
Mobile sensing problem Acquire and use data from smartphone sensors
consumes energy Higher precision requires more data Users always request longer battery life
WEBIST14, Barcelona, 4 April 2014 4 of 22
Smartphone application development
Market fragmentation => higher costs to support all mobile platforms
WEBIST14, Barcelona, 4 April 2014 5 of 22
Cross-platform frameworks Idea: write a single application in a framework
specific language that is after build into application for the different target platforms
4 different approaches: Web, Hybrid, Interpreted and Cross Compiled
WEBIST14, Barcelona, 4 April 2014 6 of 22
Web Approach
WEBIST14, Barcelona, 4 April 2014 7 of 22
Web Approach - 2
+ No installation+ Easy update+ User interface reusable across platforms
No access to app store Network delays and reduced performances Difficult to testWEBIST14, Barcelona, 4 April 2014 8 of 22
Hybrid Approach
WEBIST14, Barcelona, 4 April 2014 9 of 22
Hybrid Approach - 2
+ Store access+ Use of device features
Reduced performances No native look and feel
WEBIST14, Barcelona, 4 April 2014 10 of 22
Interpreted Approach
WEBIST14, Barcelona, 4 April 2014 11 of 22
+ Store access+ Native look and feel+ Available API for smartphone features access
Reduced performances
Interpreted Approach - 2
WEBIST14, Barcelona, 4 April 2014 12 of 22
Cross compiled approach
WEBIST14, Barcelona, 4 April 2014 13 of 22
+ Store access+ Native look and feel+ All smartphones features accessible
No reusable user interface Difficulties in code conversion and application
build
Cross compiled Approach - 2
WEBIST14, Barcelona, 4 April 2014 14 of 22
Analysis objectives Analyze energy consumption of mobile
applications which acquire data from different sensors Accelerometer Compass Microphone GPS Camera
Compare the native solution with a cross-platform application
WEBIST14, Barcelona, 4 April 2014 15 of 22
Related works Other authors already explored energy
consumption in smartphones Thompson et al. proposes a model-driven
methodology (SPOT, System Power Optimization Tool) to estimate energy consumption before app development
AppScope (Yoon et al.) is an Android energy metering system which estimate the usage of hardware components
WEBIST14, Barcelona, 4 April 2014 16 of 22
Study setup
Monsoon Power Monitor
Information about «Energy consumption», «Average current and power», «Expected battery life» etc.
WEBIST14, Barcelona, 4 April 2014 17 of 22
Study setup - 2 Tested application: native, Phonegap (Hybrid
Approach) and Appcelerator Titanium (Interpreted Approach)
Data acquisition at different sampling rates (when possible)
Test smartphone: Samsung Galaxy i9250 (battery capacity: 1750mAh)
WEBIST14, Barcelona, 4 April 2014 18 of 22
Applications
WEBIST14, Barcelona, 4 April 2014 19 of 22
Native Application Phonegap Application Titanium Application
Results
Native PhoneGap TitaniumSensor Consumed
Energy(mAh)
D (%) Consumed Energy(mAh)
D (%) Consumed Energy(mAh)
D (%)
Only App 7705,54 +27,42% 8130,85 +34,45% 7860,97 +29,99%Accelerometer 9179,99 +51,80% 12849,82 +112,49% 11972,16* +97,97%*Compass 9489,85 +56,93% 12124,6 +100,50% - -Microphone (Rec)
8120,92 +34,29% 8404,71 +38,98% - -
GPS 9301,48 +53,81% 9947,60 +64,50% 9577,27 +58,37%Camera 21857,38 +261,44% 22347,52 +269,54% 22576,45 +273,33%
WEBIST14, Barcelona, 4 April 2014 20 of 22
Table 1. Energy consumption comparison between native applications and apps developed with a framework for cross-platform development.
Energy consumption without running applications: 6047,31 mAh
Results - 2
Consumed energy increase (%)
Sensor 60ms 150ms 300ms 500ms
Accelerometer +112,49% +70,06% +49,48% +40,25%
Compass +100,50% +75,31% +52,92% +46,62%
WEBIST14, Barcelona, 4 April 2014 21 of 22
Table 2. Consumed energy using different sampling frequencies to capture data with Phonegap
Conclusions Energy consumption comparison between native
and cross-platform developed applications Results useful to choose the right framework to
develop an application Actually, cross-platform frameworks use more
energy that reduce user experience and acceptance
Compared together, Phonegap requires less energy Future works: study HTML5 (in this case the
browser becomes important) and other frameworks
WEBIST14, Barcelona, 4 April 2014 22 of 22
WEBIST14, Barcelona, 4 April 2014
Evaluating impact of cross-platform frameworks
in energy consumption of mobile application
Matteo Ciman and Ombretta GaggiDepartment of Mathematics
University of Padua, Italy{mciman, gaggi}@math.unipd.it
WEBIST14 – 10th International Conference on Web Information Systems and Technologies
Top Related