FirebaseDatabaseService constructor
when this object is instantiated then configure the following offline parameters enable persistence - the database can now be cached locally and still utilised as if it were online set the size of the cache to 10 mb
Implementation
FirebaseDatabaseService() {
database.setPersistenceEnabled(true);
database.setPersistenceCacheSizeBytes(10000000);
}