Working of Android Instant Run

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.

How Android Instant Run Works?

How Android Instant Run Works?

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

Build, deploy / install, app launch, Activity started
Build, deploy / install, app launch, Activity started

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?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s