Jisuanji kexue (Dec 2022)

Automating Release of Android APIs Based on Computational Reflection

  • WANG Yi, CHEN Ying-ren, CHEN Xing, LIN Bin, MA Yun

DOI
https://doi.org/10.11896/jsjkx.211100066
Journal volume & issue
Vol. 49, no. 12
pp. 136 – 145

Abstract

Read online

With the development of mobile hardware and 5G communication technologies,smart applications are booming,which has penetrated into all the aspects of our life and work.There are many functions in applications,which can not only satisfy the user’s requirements,but also be further released as APIs for external invocations.For instance,the APIs provided by applications can be invoked by the intelligent voice assistant.However,these functions must be released as APIs during the development phase,otherwise they cannot be used for external invocations.To address this problem,this paper proposes an approach to automatic release of APIs of Android applications based on computational reflection.It first rebuilds runtime software architecture for the activities of Android applications based on the reflection mechanism,without modifying the source code of application.Then,based on test cases of the specified function,it analyzes its user-behavior workflow and corresponding procedure calls.Finally,the function can be invoked by simulating the user behaviors,and then is released as the corresponding API.We evaluate our approach with 300 popular apps on Android app store Wandoujia,and the results show that our approach is effective for 280 of them.For the specified functions,APIs can be implemented by our approach in about 15 minutes,and their runtime performance is desirable.

Keywords