Skip to content
Implementation of a navigation-aware technique for personalized prefetching of network requests of Android apps
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Implementation of a navigation-aware technique for personalized prefetching of network requests of Android apps. A description of the internals of the NAPPA approach is available in our ICSE 2019 publication.


In order to perform a Navigation-Aware prefetching, NAPPA introduces the notion of an Extended Navigation Graph. This graph is built by letting nodes represent activities, and all edges represent activity transitions within the application. The ENG plays a central role in the prefetching process by exposing prefetch enabled URLs ( What ) and by keeping track of which prefetch enabled URL Candidates are most likely to be accessed in subsequent activity transitions ( When).

Extended Navigation Graph

An URL may be composed of both static components (for example the domain name and path) and also dynamic components (such as URL parameters). The ENG addresses the challenge of identifying dynamic URL components by capturing intent extras between activity transitions. Whenever an HTTP Request is performed, NAPPA verifies if any of the extras captured on previous activity transitions corresponds to an URL component. If so, an association between an extra and its corresponding static URL components is created—this becomes a prefetch enabled URL candidate.


In order to enable prefetching with NAPPA, an instrumentation process must take place at development time. This task is performed via a plugin which can be installed in Android Studio in order to inject all critical NAPPA dependencies to an Application’s source code.


Currently, NAPPA makes use of OkHTTP3 interceptors in order to intercept HTTP requests performed by the end-user. Intercepted requests are served by NAPPA whenever they are stored in the cache. Otherwise, they are rerouted to the origin server.

Installing the Plug-in

In order to Install the plug-in in android studio, please take the following steps:

In order to Install the in android studio, please take the following steps: Build the plugin with ./gradlew buildPlugin The plugin binaries can be found in build/distributions Install Plugin in Android Studio: File -> Settings -> Plugins -> Install plugin from disk Restart Android Studio.

Plugin Installation


In the main bar you will found a new Menu called "Prefetching"

Nappa Android Studio Plugin

Use "Spot intent" to instrument intents in order to get Intent arguments Use "Spot OkHttp" to instrument OkHttp Builder in order to track HTTP/GET requests use "Add prefetching" to instrument Activities in order to get the navigation graph

After the instrumentation process takes place, NAPPA performs the ENG construction dynamically. Prefetching is performed transparently without requiring any intervention from the end user. As the user navigates an application's activities, the ENG is built and prefetching is performed whenever a suitable candidate is encountered.

How to cite NAPPA

If NAPPA is helping your research, consider to cite is as follows, thanks!

	author = {Ivano Malavolta and Francesco Nocera and Patricia Lago and Marina Mongiello},
	month = {May},
	title = {{Navigation-aware and Personalized Prefetching of Network Requests in Android Apps}},
	booktitle = {Proceedings of the 41st ACM/IEEE International Conference on Software Engineering},
	year = {2019},
 	location = {Montreal, Canada},
 	numpages = {4},
 	publisher = {IEEE Press},
	url = {}


This software is licensed under the MIT License.

You can’t perform that action at this time.