I currently have audio notifications via Snarl that execute when Gradle builds are complete. Additionally, I use a SharedPreference at OnCreate() to detect the first time that my app is launched, which has a separate audio notification using MediaPlayer.
The first launch method works fine, but there is some lag with the Snarl method (between the Gradle build finishing and the app actually launching).
Is it possible to incorporate a way to explicitly detect that an app has been launched by Android Studio? I'd like to have an audio notification that plays whenever I build the app, but not when the app is launched regularly.
The purpose of this is to make use of build time & get some quick exercise in (it adds up!).
Some possible solutions that I've found are ACTION_PACKAGE_CHANGED, ACTION_PACKAGE_INSTALL, & ACTION_PACKAGE_REPLACED; but I'm not quite sure if they would work for this purpose, or how to implement them.