Skip to content Skip to sidebar Skip to footer

Skip Row In Firebaserecycleradapter

'news' : { '-KnLRSIOyD7HgldFGty' : { 'caption' : 'some grounds', 'content' : 'some contents', 'created_on' : 1498246403444, 'newspaper_id' : '-KnLPu2N50

Solution 1:

Currently Firebase supports only a single orderBy per query.

So if you want to filter or order the results on more than one property (2 query in your case), you'll either have to do the additional filtering (or ordering) client-side in your Android code or you'll have to come up with your own indexing scheme that combines the properties.

In your case i suggest you add a new child named newspaperId_status which can get the value as concatenation of both values like this:

newspaperId_status: -KnLPu2N5039ZbqS_false

In this way you can query all newspappers which have the status of false.

Hope it helps.

Post a Comment for "Skip Row In Firebaserecycleradapter"