I did try that method but for some reason it wouldn't install. Seemed like it was conflicting with an already installed app (had already uninstalled it) so by using Android studio I could change the package name at the same time.
Also did see some people mention it might be a bad idea to give your API key out to randos on the internet which is fair enough.
I think the best thing to do if you want to continue using Infinity would be to just compile your own APK with your own API key.
I've never used android studio before but didnt take me very long to work out how, and it all seems to be working.
You only need to change a couple of settings and about 3 lines of code.