I want to load quotes from firebase recycler view and want to show random quotes to user how to load random quotes or data from firebase in Android Studio using Java?
Any suggestions??
I want to load quotes from firebase recycler view and want to show random quotes to user how to load random quotes or data from firebase in Android Studio using Java?
Any suggestions??
id: number,
text: "some text"
If you verify, that you have no missing numbers in your firestore, you could get the id of the latest quote.
Now you have a range of ids from 0 to the latest quote.
Just use randInt and get some quotes of the whole array.
If you can't verify that your numbers are continues due to deletions, you could fetch a list of all ids as an array and use randInt on the array index.