skip to main content
10.1145/2593902.2593908acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
Article

Exposing native device APIs to web apps

Published: 02 June 2014 Publication History

Abstract

A recent survey among developers revealed that half plan to use HTML5 for mobile apps in the future. An earlier survey showed that access to native device APIs is the biggest shortcoming of HTML5 compared to native apps. Several different approaches exist to overcome this limitation, among them cross-compilation and packaging the HTML5 as a native app. In this paper we propose a novel approach by using a device-local service that runs on the smartphone and that acts as a gateway to the native layer for HTML5-based apps running inside the standard browser. WebSockets are used for bi-directional communication between the web apps and the device-local service. The service approach is a generalization of the packaging solution. In this paper we describe our approach and compare it with other popular ways to grant web apps access to the native API layer of the operating system.

References

[1]
P. Adenot, C. Wilson, and C. Rogers. Web audio API. W3C working draft, W3C, Oct. 2013. http://www.w3.org/TR/2013/WD-webaudio- 20131010/.
[2]
S. Block and A. Popescu. Deviceorientation event specification. W3C working draft, W3C, Dec. 2011. http://www.w3.org/TR/2011/WD-orientation-event- 20111201/.
[3]
T. ¸ Celik and A. van Kesteren. Fullscreen. W3C working draft, W3C, July 2012. http://www.w3.org/TR/2012/WD-fullscreen- 20120703/.
[4]
A. Charland and B. Leroux. Mobile application development: Web vs. native. Commun. ACM, 54(5):49–53, May 2011.
[5]
Google. V8 javascript engine. http://code.google.com/p/v8/. Accessed: 2014-01-22.
[6]
D. Hardt. The OAuth 2.0 Authorization Framework. RFC 6749 (Proposed Standard), Oct. 2012.
[7]
D. Haza¨ el-Massieux, S. Chitturi, N. Widell, M. A. Oteo, and M. Froumentin. The messaging API. W3C working draft, W3C, Apr. 2011. http://www.w3.org/TR/2011/WD-messaging-api- 20110414/.
[8]
I. Hickson. Web SQL database. W3C note, W3C, Nov. 2010. http://www.w3.org/TR/2010/NOTEwebdatabase-20101118/.
[9]
I. Hickson. The websocket API. Candidate recommendation, W3C, Sept. 2012. http://www.w3.org/TR/2012/CR-websockets- 20120920/.
[10]
B. Leiba. Oauth web authorization protocol. IEEE Internet Computing, 16(1):74–77, 2012.
[11]
L. Masinter. The ”data” URL scheme. RFC 2397 (Proposed Standard), Aug. 1998.
[12]
T. Mikkonen and A. Taivalsaari. Apps vs. open web: The battle of the decade. In Proceedings of the 2nd Workshop on Software Engineering for Mobile Application Development (MSE’2011), pages 22–26, 2011.
[13]
Mozilla.org. Rhino: Javascript for java. http://www.mozilla.org/rhino/. Accessed: 2014-01-22.
[14]
J. Ohrt and V. Turau. Cross-platform development tools for smartphone applications. Computer, 45(9):72–79, 2012.
[15]
I. Oksanen, A. Kostiainen, and D. Haza¨ el-Massieux. HTML media capture. Candidate recommendation, W3C, May 2013. http://www.w3.org/TR/2013/CRhtml-media-capture-20130509/.
[16]
J. Orlow, J. Bell, A. Popescu, E. Graff, J. Sicking, and N. Mehta. Indexed database API. Candidate recommendation, W3C, July 2013. http://www.w3.org/TR/2013/CR-IndexedDB- 20130704/.
[17]
A. Popescu. Geolocation API specification. W3C recommendation, W3C, Oct. 2013. http://www.w3.org/TR/2013/REC-geolocation-API- 20131024/.
[18]
A. Puder and O. Antebi. Cross-Compiling Android Applications to iOS and Windows Phone 7. Mobile Networks and Applications, 18(1):3–21, 2013.
[19]
N. Tillmann, M. Moskal, J. de Halleux, and M. Fahndrich. Touchdevelop: programming cloud-connected mobile devices via touchscreen. In Proceedings of the 10th SIGPLAN symposium on New ideas, new paradigms, and reflections on programming and software, ONWARD ’11, pages 49–60, New York, NY, USA, 2011. ACM.
[20]
A. van Kesteren. Cross-origin resource sharing. Candidate recommendation, W3C, Jan. 2013. http://www.w3.org/TR/2013/CR-cors-20130129/.
[21]
VisionMobile. Cross-platform developer tools 2012. http://www.visionmobile.com/product/ cross-platform-developer-tools-2012/, 2012. Accessed: 2013-12-02.
[22]
VisionMobile. Developer economics Q3 2013: State of the developer nation. http://www.visionmobile.com/product/ developer-economics-q3-2013-state-of-the-\ developer-nation/, 2013. Accessed: 2013-12-02.
[23]
J. Wargo. PhoneGap Essentials: Building Cross-Platform Mobile Apps. Pearson Education, 2012.

Cited By

View all
  • (2019)Intelligent Framework for Learning Physics with Aikido (Martial Art) and Registered SensorsSensors10.3390/s1917368119:17(3681)Online publication date: 24-Aug-2019
  • (2019)MUIT: A Domain-Specific Language and its Middleware for Adaptive Mobile Web-Based User Interfaces in WS-BPELIEEE Transactions on Services Computing10.1109/TSC.2016.263353512:6(955-969)Online publication date: 1-Nov-2019
  • (2018)A Survey and Taxonomy of Core Concepts and Research Challenges in Cross-Platform Mobile DevelopmentACM Computing Surveys10.1145/324173951:5(1-34)Online publication date: 19-Nov-2018
  • Show More Cited By

Index Terms

  1. Exposing native device APIs to web apps

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    MOBILESoft 2014: Proceedings of the 1st International Conference on Mobile Software Engineering and Systems
    June 2014
    108 pages
    ISBN:9781450328784
    DOI:10.1145/2593902
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    In-Cooperation

    • TCSE: IEEE Computer Society's Tech. Council on Software Engin.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 02 June 2014

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. HTML5
    2. Native API
    3. Web apps

    Qualifiers

    • Article

    Conference

    ICSE '14
    Sponsor:

    Upcoming Conference

    ICSE 2025

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)9
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 18 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2019)Intelligent Framework for Learning Physics with Aikido (Martial Art) and Registered SensorsSensors10.3390/s1917368119:17(3681)Online publication date: 24-Aug-2019
    • (2019)MUIT: A Domain-Specific Language and its Middleware for Adaptive Mobile Web-Based User Interfaces in WS-BPELIEEE Transactions on Services Computing10.1109/TSC.2016.263353512:6(955-969)Online publication date: 1-Nov-2019
    • (2018)A Survey and Taxonomy of Core Concepts and Research Challenges in Cross-Platform Mobile DevelopmentACM Computing Surveys10.1145/324173951:5(1-34)Online publication date: 19-Nov-2018
    • (2018)Progressive Web Apps for the Unified Development of Mobile ApplicationsWeb Information Systems and Technologies10.1007/978-3-319-93527-0_4(64-86)Online publication date: 19-Jun-2018
    • (2016)A unified web interface for the internet of things2016 IEEE Annual India Conference (INDICON)10.1109/INDICON.2016.7839142(1-6)Online publication date: Dec-2016
    • (2016)Modeling and verification of timed automaton based hybrid systems using spin model checker2016 IEEE Annual India Conference (INDICON)10.1109/INDICON.2016.7839011(1-8)Online publication date: Dec-2016
    • (2014)Recommendations for Webview Based Mobile Applications on Android2014 IEEE International Conference on Advanced Communications, Control and Computing Technologies10.1109/ICACCCT.2014.7019375(1589-1592)Online publication date: May-2014

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media