How do I run tasks before the apk is executed on the current emulator to setup files and such?
Currently I’m running code within the app. These do things mainly which is to copy assets. The problem is that this is actually causing some problems with separation of concerns. Not a huge deal to get around but I’d rather offload it all to some build script as it will make the code much cleaner.
I could probably just use adb to push the files and such but I don’t even know how to add such a task. I have added a task to do some local copying by of course that isn’t executed on the emulator. I also likely need to have it run after the app is installed(I might want to configure some properties too) but before launching.
It should also be “emulator agnostic” because I use wsl and a some downloaded emulators so I have to be able to choose the right one correctly.
Just to be clear, I want to be able to hit the “debug button” in android and then have, between android studio installing the app or whatever it does and actually executing it, to execute some code/copy some files/etc without too much trouble(else it is easier just to continue doing the setup in the app itself).