针对Android应用开发中应用内部及应用之间的交互非常频繁的问题,对应用交互的模式、返回路径、传输媒介与任务栈等进行研究,旨在提高应用的系统效率.Intent组件是应用之间交互的媒介,对Intent组件的主要属性、显式Intent与隐式Intent两种启动目标组件方式进行了详细的说明,并提供了具体的实现代码.在不同应用之间的交互情境下选择不同的Intent启动方式有利于提高交互的效率.在Activity的返回路径上,提出任务栈返回与Task Stack Builder对象管理返回两种模式及解决方案,解决了顺序路径的返回及指定路径的返回等问题,并在多个型号的设备上进行了测试验证.
During the development of the Android application, the interaction often occurs frequently between the internal application and applications. So the following aspects which include the application interaction pattern, return path, transmission medium and task stack, etc., are studied to improve the system efficiency of the application. Intent components are an interactive medium between applications. Firstly, we make a detailed description for the main attributes, two ways of starting the target component by explicit Intent and implicit Intent. And then we provide a specific implementation code. It is helpful to improve the efficiency of interaction by choosing different Intent startup modes under the interaction between different applications. On the return path of Activity, this paper puts forward two modes and solutions for the return of task stack and TaskStackBuilder object management. As a consequence, the problems of sequential return path or special path are resolved, which has been verified on multiple types of devices.