arXiv:2610.19150cs.SEOct 2026

Manuscript Offprint

arXiv:2610.19150

A Systematic Study of Deprecated Android API Usage Updates

Tarek Mahmud, Meiru Che, Guowei Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Tarek Mahmud 1^{1}, Meiru Che 2^{2}, and Guowei Yang 3^{3}

1^{1} Texas A&M University–Kingsville, Kingsville, TX, USA

Tarek.Mahmud@tamuk.edu

2^{2} Central Queensland University, Brisbane, QLD, Australia

m.che@cqu.edu.au

3^{3} The University of Queensland, Brisbane, QLD, Australia

guowei.yang@uq.edu.au

Abstract. Android Application Programming Interfaces (APIs) continuously evolve, causing existing APIs to become deprecated and requiring developers to migrate their usages to recommended replacements. Although prior studies have proposed automated migration techniques, their effectiveness is often limited by the diversity and contextual complexity of API changes. This paper presents a systematic study of deprecated Android APIs, their recommended replacements, and real-world usage updates performed by developers. Based on an analysis of 1,000 deprecated APIs and 4,336 migration examples collected from GitHub, we identify six migration categories and derive recurring usage-update patterns involving Android-version checks, parameter adaptation, object initialization, data-type conversion, and changes in API interaction mechanisms.

To assess their applicability, we augment the zero-shot GUPPY benchmark [30] prompts with the migration category and corresponding usage-update pattern. On 156 benchmark tasks, the pattern-guided prompt improves correct updates from 139 to 147 and performs better in five of the six categories.

Keywords: Android, API evolution, API Deprecation, API migration, API usage update

1 Introduction

In recent years, mobile devices have become indispensable in daily life, supporting activities such as navigation, communication, education, and entertainment. Among mobile operating systems, Android dominates the market with over 70% share [1][1] and more than 3.2 billion active devices as of 2022 [2][2]. As of 2023, the Google Play Store hosted over 2.69 million Android apps [3][3], built using the Android Software Development Kit (SDK) and its extensive set of APIs. However, as Android evolves, its APIs are frequently updated by introducing new methods, modifying existing interfaces, and deprecating outdated functionality. The

T. Mahmud et al.

current Android API level has reached 34, underscoring the continuous evolution of the platform.

Android API depreciation marks APIs as outdated and signals that developers should migrate to recommended replacement APIs when available. Although deprecated APIs may remain functional on older Android versions, their continued use can lead to compatibility issues, crashes, feature loss, security concerns, or maintenance difficulties as the platform evolves. To manage these changes, the Android framework follows a structured deprecate-replace-remove cycle [24]. In this process, an API is first marked as deprecated in the SDK documentation, for example through the @Deprecated annotation, and is often accompanied by a depreciation message that recommends an alternative. For instance, the depreciation message for getAllNetworkInfo() recommends using getAllNetworks() instead. After a grace period that may span several Android releases, deprecated APIs can be removed from the framework. This phased process gives developers time to update their applications while preserving compatibility across Android versions. Consequently, updating deprecated API usages is important for maintaining app compatibility, adopting newer platform functionality, and preserving application quality.

Prior research has investigated Android API evolution [32,25,26,24,31,20] and proposed automated techniques for updating deprecated API usages [11,12,13,42,30]. These techniques have demonstrated the potential of example-based transformation, program analysis, handcrafted templates, and large language models for automating API migration. However, existing approaches mainly focus on generating updates rather than systematically understanding how developers perform such migrations in practice. In particular, limited attention has been paid to the recurring structural and behavioral patterns that developers follow when adapting parameters, handling Android-version differences, creating replacement objects, converting data types, or restructuring API interactions. This lack of systematic migration knowledge can limit the effectiveness and generalizability of automated approaches, especially when replacement APIs require more than a direct syntactic substitution.

In this paper, we systematically analyze Android’s officially documented deprecated APIs, their depreciation messages, and their recommended replacement APIs. We further examine real-world code changes to understand how developers update deprecated API usages in Android applications. From this analysis, we identify six migration categories and derive reusable usage-update patterns that capture recurring developer strategies, including Android-version checks, parameter adaptation, object initialization, data-type conversion, and changes in API interaction mechanisms. Rather than proposing a complete migration tool, our primary goal is to uncover and formalize the strategies developers follow during API migration.

We also assess the applicability of these patterns to automated API updating by augmenting the zero-shot GUPPY [30] prompt with the migration category and corresponding usage-update pattern. On the 156 tasks in the GUPPY benchmark, the pattern-guided prompt increases the number of correct updates from

139 to 147 and performs better in five of the six migration categories. These results show that empirically derived migration patterns can provide useful domain guidance for LLM-based deprecated API updating.

Specifically, we make the following contributions:

– Categorization of Migration Scenarios: We identify and categorize recurring migration scenarios based on the structural relationships between deprecated and replacement APIs, including changes in return types, parameters, data types, and API kinds.

– API Usage-Update Patterns: We analyze real-world migration examples and derive common patterns that developers apply when updating deprecated API usages, including version checks, parameter adaptation, object initialization, data-type conversion, and interaction restructuring.

– Applicability study: We incorporate the identified migration categories and usage-update patterns into the GUPPY prompt and evaluate their usefulness on the GUPPY benchmark [30]. The results provide empirical evidence that developer-derived migration patterns can improve LLM-guided deprecated API updates.

References (39)