https://stackoverflow.com/questions/62253691/firebasemessaging-getinstancefirebaseapp-for-secondary-app-supposed-to-be-publ
The constructor which referenced by the documents is not public in real life. Right now I'm using Java reflection to access it and set it to public in the name of "sudo make me a sandwitch!". But it'd be better to have a more legitimate solution.
This is all due to the fact that we are operating everything on secondary databases, which is not the usual way. We use secondary databases because each app user brings their own database and configures it, so I as the author don't have to store any highly sensitive data.