I have never used the singleton pattern before. I had declared the initialization of firestore at the beginning of MainActivity for access to the database in all classes without