Sign inSubmit
computersciencejournal.org is not ours. This journal is published only at thescipub.com/jcs. Report a suspicious emailcomputersciencejournal.org is not ours · Report
ArticleMetrics
Research Article · Open access · Published 10 January 2019

A Static Analysis of Android Source Code for Lifecycle Development Usage Patterns

Noura Hoshieah1, Samer Zein1, Norsaremah Salleh2 & John Grundy3

Journal of Computer Science, Volume 15, Issue 1, pp. 92–107 · doi.org/10.3844/jcssp.2019.92.107

8,661 accesses4,670 downloads3 citations (Crossref)Metrics
Cite Check for updates

Abstract

Building robust Android apps is a non-trivial task that requires skilled developers to understand various Android platform peculiarities. However, among the Android developers community, a large fractions are considered to be novice and inexperienced developers. One of the main peculiarities in the Android app development is the activity lifecycle model. A developer needs to have deep understanding of the different lifecycle states and callback methods that an Android activity can go through during its runtime. These callback methods are called by the system whenever an app activity changes its state. The developer needs to override appropriate callback methods correctly to avoid app memory leaks and data loss or other phone resource compromise. Detailed static analysis of software applications provides actionable insights and helps us to understand how applications are actually built. Although there have been many studies focusing on static analysis of Android apps in the areas of testing, quality, design, privacy and security; no studies to date focus on lifecycle development practices and usage patterns thus far. In this paper, we analyzed 842 open-source Android apps containing 5577 activities to explore and understand how Android developers actually comply with best practices regarding the Android activity lifecycle model. We developed a tool named SAALC that is capable of analyzing Android activities and extracting valuable information about lifecycle callback methods usage. Our results show, which callback methods are implemented and the nature of the code they contain. The results also show incorrect implementation of the callback methods and incorrect acquiring and releasing of system resources in many Android apps and we argue that a relatively large fraction of Android developers do not sufficiently well understand the app lifecycle model. We also discuss our results in comparison to the Android app lifecycle model best practices.

Licence and reuse

Open access. This article is licensed under a Creative Commons Attribution 3.0 Licence (CC BY 3.0), as printed on the article, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original authors and the source. No permission is needed.

How to reuse this article

Responses (0)

Have a comment on this research? Sign in to respond. Responses are moderated and published with your name and affiliation; the authors are invited to reply. How we use your dataWrite a response

About this article

Cite this article

Hoshieah, N., Zein, S., Salleh, N. & Grundy, J. (2019). A Static Analysis of Android Source Code for Lifecycle Development Usage Patterns. Journal of Computer Science, 15(1), 92–107. https://doi.org/10.3844/jcssp.2019.92.107

Licence
CC BY 3.0
Issue
Volume 15, Issue 1
Policies
Editorial independenceUse of generative AIData availabilityAppeals and complaints
Version
Version of record
A Static Analysis of Android Source Code for Lifecycle Development Usage PatternsJournal of Computer Science · Volume 15, Issue 1 · pp. 92–107 · CC BY 3.0Download