An Observational Study on the State of REST API Uses in Android Mobile Applications. Belkhir, A., Abdellatif, M., Tighilt, R., Moha, N., Gu�h�neuc, Y., & Beaudry, �. In Poshyvanyk, D. & Malavolta, I., editors, Proceedings of the 6<sup>th</sup> International Conference on Mobile Software Engineering and Systems (MOBILESoft), pages 66–75, May, 2019. ACM Press. 10 pages.
An Observational Study on the State of REST API Uses in Android Mobile Applications [pdf]Paper  abstract   bibtex   
REST is by far the most commonly-used style for designing APIs, especially for mobile platforms. Indeed, REST APIs are well suited for providing content to apps running on small devices, like smart-phones and tablets. Several research works studied REST APIs development practices for mobile apps. However, little is known about how Android apps use/consume these APIs in practice through HTTP client libraries. Consequently, we propose an observational study on the state of the practice of REST APIs use in Android mobile apps. We (1) build a catalogue of Android REST mobile clients practices; (2) define each of these practices through a number of heuristics based on their potential implementations in Android apps, and (3) propose an automatic approach to detect these practices. We analyze 1,595 REST mobile apps downloaded from the Google Play Store and mine thousands of StackOverflow posts to study REST APIs uses in Android apps. We observe that developers have always used HttpURLConnection class for REST APIs implementation in Android apps. However, since the apparition of REST third-party libraries such as Okhttp, Retrofit and Google Volley, Android REST clients have been increasingly relying on the facilities offered by these libraries. Also, we observe that developers used to ignore some good practices of REST APIs uses in Android apps. Such practices are the use of HTTP third-party libraries, caching responses, timeout management, and error handling. Moreover, we report that only two good practices are widely considered by Android developers when implementing their mobile apps. These practices are network connectivity awareness and JSON vs. XML response parsing. We also find that Retrofit is the most targeted third-party HTTP client library by Android developers because of its ease of use and provided features. Thus, we conclude that service providers must strive to make their libraries as simple as possible while mobile-service consumers should consider existing libraries to benefit from their features, such as asynchronous requests, awareness to connectivity, timeout management, and cached responses.

Downloads: 0