Support Topics Documentation Slack YouTube Blog

Real time disconnecting from service

(Mendelson Dalpakim) #1


I’m trying to work with real time on android but I keep getting “V/FA: Inactivity, disconnecting from the service”
this is my code:
EventHandler<BackendlessUser> userEventHandler = Backendless.Data.of(BackendlessUser.class).rt();
userEventHandler.addUpdateListener(new AsyncCallback<BackendlessUser>() {
public void handleResponse(BackendlessUser response) {
url = response.getProperty(“filename”).toString();

public void handleFault(BackendlessFault fault) {

(Oleg Vyalyh) #2

I’ve created inner task to investigate the problem further.

(Oleg Vyalyh) #3

Are you still experiencing this problem?
I tried with my app and your code example, all works fine.
By the way, i would recommend to check if the response.getProperty(“filename”) returns not null.

(Mendelson Dalpakim) #4

Changed to not null, still the same problem
adding a screen shot

(Oleg Vyalyh) #5

I’m talking not about response.getProperty("filename").toString() but about response.getProperty("filename")

And i also would recommend to remove all code inside handleResponse() and put there only one logging command, just to check whether the handler is invoked.

(Mendelson Dalpakim) #6

one logging command?
You mean log in to Backendless?

(Oleg Vyalyh) #7

No, i mean just logcat.

(Mendelson Dalpakim) #8


(Oleg Vyalyh) #9

if you put breakpoint on line 36, will it work?

(Mendelson Dalpakim) #10

The breakpoint didn’t do anything, but I figured something, the app response when I change something directly in the data base but not when I update through code from other device

(Oleg Vyalyh) #11

Ok, we’ll check this behaviour.

(Oleg Vyalyh) #12

I’ve tried with two devices. One of them was changing records in Users table, and another one listening to the changes in the same table. And all notifications were coming successfully.
Have you any other logic in your project that may influence on network work or maybe you have some other backendless api calls the app ?
Try to create totally clear app without any logic except one simple RT listener. Post here about your results, please.

(Mendelson Dalpakim) #13

I created a new app, tried a simple RT listener and still nothing,
I’m obviously doing something wrong I just don’t know what, I’m uploading the sample project so you can see
what is wrong

(Oleg Vyalyh) #14

I found a problem in your sample: TestActivity class, line 66.

Try to use:
since you subscribe to listen to changes in Data service:

Also pay attention to build.gradle. It looks a little bit strange, because of nested dependencies sections.