Most of Android developer wants to know that how Android Instant Run works. It’s a feature in Android Studio that uses magic to significantly reduce the build and deploy times for incremental code changes during your coding / testing / debugging life-cycle.
Yes of-course, I say magic, because for the most part that’s how it looks. The first time you hit run or debug, it works like you’d expect — then each time. But you make a change and hit run or debug again (this time with a on the icon), the changes are applied before I’ve had a chance to shift my attention to my phone.
Start with this simple flow chart of a typical build cycle
The goals of Instant Run are really simple:
REMOVE AS MANY OF THESE STEPS AS POSSIBLE, AND MAKE WHATEVER REMAINS AS FAST AS POSSIBLE.
In practice that means:
- Build and deploy only the incremental changes.
- Don’t reinstall the app.
- Don’t restart the app.
- Don’t even restart the Activity.
Source : How Android Instant Run Works?