Android Studio - Prompt before launching Emulator

Viewed 39

Is there a way on Android Studio to prompt the user before launching the Emulator ?

Sometimes I forget to plug my physical device, or it gets undetected for some reason.

Then when I click on run app, and forget to check the selected device, it auto launches the first set-up emulator. This is annoying as it takes some time to stop the launching process.

A dialog prompting if I want to start an emulator would be nice.

1 Answers

Well, its not something instantly available, but still can be achieved by multiple steps,

  • Create a gradle task that finds connected devices gradle task
  • Execute this above task before generating build by combining with this method Before build task
Related