Can some body help me in keeping Firebase database connection always online? I have been working on a project which is similar to UBER app. I just want to make customer able to see driver even when driver's app is working in background. For that I have to keep Firebase Database and driver app connected i.e FirebaseDatabase.getInstance().goOnline(). always !! At least for few hours. The story is like there are two apps where we can see each others locations on map fragment and i just want to do like if first one's app is working in background , even then the second one should be able to see the location (marker of first) of first one. In my case it lasts for only few minutes. I have researched a lot and i got to know about Services which work in background but my doubt is how can that Services can make my app Activities connected to FirebaseDatabase. Is it like, if services are working and connected with database, then my app Activities are also connected ? i.e FirebaseDatabase.getInstance().goOnline() == true ??
Need some codes and help ! please!!