#!/usr/bin/env bash

gradle assembleDebug
adb install -r app/build/outputs/apk/app-debug-unaligned.apk
adb shell am start -n com.example.android.sunshine.app/com.example.android.sunshine.app.MainActivity

#!/usr/bin/env bash

gradle assembleDebug
adb install -r app/build/outputs/apk/app-debug-unaligned.apk
sleep 5
adb shell am start -n com.example.android.sunshine.app/com.example.android.sunshine.app.MainActivity

Add sleep time between install and activity start
Add sleep time between install and activity start

Without sleep time the activity often wasn't ready to be started. There
is a delay between app install completion and the activity being ready
to be called.
