Abstract:Android developers need to accumulate experience to enhance their ability to design Android interface and behavior. Code recommendation has been one of the focuses in data driven software development. In this context, this paper proposes a method of UI interaction pattern extraction and retrieval for Android applications. The method offers the ability to retrieve and recommend UI related codes, so that developers' effort of selecting, using and learning Android applications can be reduced. The UI interaction pattern of an activity represents the interface composition and the interaction behavior of the activity. Taking the pattern as the target, this method extracts the UI interaction pattern of each activity from a set of open source Android applications. Consequently, the method supports users to retrieve the related design details of activities by constructing queries. The method is implemented as a set of tool chains that provide automatic support for extracting and retrieving. Furthermore, the accuracy and effectiveness of the method are verified by two working examples.