How to Run Your Android App in an Emulator - dummies

How to Run Your Android App in an Emulator

By Michael Burton

You’ve done it — you’ve written your first Android app. Now it’s time to install your app on the emulator and put that baby into action! Follow these steps:

The Choose a Device screen appears when you run an app in Android Studio.

1In Android Studio, choose Run→Run ‘Silent Mode Toggle’.

You see the Choose Device window.

2If your emulator is already running, select it now.

Otherwise, select Launch Emulator and choose your desired emulator.

Click the Use same device for future launches check box to avoid having to see the dialog box every time you launch your app.

Launching an app on an emulator.

3Wait for the emulator to load and launch your app.

Your application starts and the emulator runs your program.

If your application doesn’t start, try Step 1 again and watch the Android view to see the logcat output from your app.

Running the Silent Mode Toggle app in Android Studio's emulator.

4Click the Toggle Silent Mode button to see the image toggle.

Notice the new icon on the notification bar — the Silent Notification icon.

5Return to the Home screen by clicking the Home button on the emulator.

Open the application (it’s the center button at the bottom of screen).

You see the application launcher icon in the list of applications.

After the emulator is running, it’s running on its own. The emulator has no dependencies on Android Studio. In fact, you can close Android Studio and still interact with the emulator.