firebase - Updating Android UI when database changes -


my android app uses volley http communication web service built django rest framework. backend consists of mysql database , python.

the app consist of multiple users updating same page. page update close real time. when there update database (via web service) push updates connected clients. prefer push data clients instead of polling server.

what recommended approach syncing database android ui?

here of options have come across:

android sync adapter

firebase cloud messaging (if go route need migrate database?)

pubnub

is there way accomplish volley?

i suggest use pubnub of realtime data management , use either broadcast receivers, eventbus or otto fire events listen locally. let me explain bit more.

in database, when there successful crud operation, can publish pubnub server. in turn fire off clients subscribers. in application, can have android service running , listen , process pub nub events being received. @ point, can fire local events within application using eventbus or otto , have views react events. reason suggesting separating out event management if change realtime data providers, require little code change in application since it encapsulated in android service , not throughout application.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -