0

If my android one to one chat app has 3 users A ,B, C.

When A send message to B.

C will not save this message data to disk?

In fact, C cannot see the message between A and B

FirebaseDatabase.getInstance().setPersistenceEnabled(true); 

Meaning 1: save all data in the database to disk?

or Meaning 2: Only I have browsed?

1
  • if database has 100 messages and 90 messages was A send to B,will C save 100 message data to C's disk? Commented Apr 23, 2018 at 7:52

1 Answer 1

2

I guess you have misunderstood setPersistenceEnabled. This is the caching mechanism used by firebase. If you have enabled this option, if your app is offline then firebase caches your previously loaded data locally and displays it to you. When the network is back it synchs.

Below is the detailed description of how its works,

https://firebase.google.com/docs/database/android/offline-capabilities

Sign up to request clarification or add additional context in comments.

2 Comments

yes i want to ask its only catches previously loaded data or not?
Only the one which loaded previously.. @osas

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.