A static analysis of android source code for lifecycle development usage patterns

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...

Full description

Bibliographic Details
Main Authors: Hoshieah, Noura, Zein, Samer, Salleh, Norsaremah
Format: Article
Language:English
English
Published: Science Publications 2019
Subjects:
Online Access:http://irep.iium.edu.my/73280/
http://irep.iium.edu.my/73280/
http://irep.iium.edu.my/73280/
http://irep.iium.edu.my/73280/1/73280_A%20Static%20Analysis%20of%20Android%20Source_article.107
http://irep.iium.edu.my/73280/2/73280_A%20Static%20Analysis%20of%20Android%20Source_scopus.pdf
id iium-73280
recordtype eprints
spelling iium-732802019-07-12T09:11:11Z http://irep.iium.edu.my/73280/ A static analysis of android source code for lifecycle development usage patterns Hoshieah, Noura Zein, Samer Salleh, Norsaremah QA76 Computer software 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. Science Publications 2019 Article PeerReviewed application/pdf en http://irep.iium.edu.my/73280/1/73280_A%20Static%20Analysis%20of%20Android%20Source_article.107 application/pdf en http://irep.iium.edu.my/73280/2/73280_A%20Static%20Analysis%20of%20Android%20Source_scopus.pdf Hoshieah, Noura and Zein, Samer and Salleh, Norsaremah (2019) A static analysis of android source code for lifecycle development usage patterns. Journal of Computer Science, 15 (1). pp. 92-107. ISSN 1549-3636 https://thescipub.com/pdf/10.3844/jcssp.2019.92.107 10.3844/jcssp.2019.92.107
repository_type Digital Repository
institution_category Local University
institution International Islamic University Malaysia
building IIUM Repository
collection Online Access
language English
English
topic QA76 Computer software
spellingShingle QA76 Computer software
Hoshieah, Noura
Zein, Samer
Salleh, Norsaremah
A static analysis of android source code for lifecycle development usage patterns
description 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.
format Article
author Hoshieah, Noura
Zein, Samer
Salleh, Norsaremah
author_facet Hoshieah, Noura
Zein, Samer
Salleh, Norsaremah
author_sort Hoshieah, Noura
title A static analysis of android source code for lifecycle development usage patterns
title_short A static analysis of android source code for lifecycle development usage patterns
title_full A static analysis of android source code for lifecycle development usage patterns
title_fullStr A static analysis of android source code for lifecycle development usage patterns
title_full_unstemmed A static analysis of android source code for lifecycle development usage patterns
title_sort static analysis of android source code for lifecycle development usage patterns
publisher Science Publications
publishDate 2019
url http://irep.iium.edu.my/73280/
http://irep.iium.edu.my/73280/
http://irep.iium.edu.my/73280/
http://irep.iium.edu.my/73280/1/73280_A%20Static%20Analysis%20of%20Android%20Source_article.107
http://irep.iium.edu.my/73280/2/73280_A%20Static%20Analysis%20of%20Android%20Source_scopus.pdf
first_indexed 2023-09-18T21:43:54Z
last_indexed 2023-09-18T21:43:54Z
_version_ 1777413321373253632