It was the thread issue. I called the function in the background thread and it didn't work. Should call in the UI thread.
'''
runOnUiThread (new Thread(new Runnable() {
public void run() {
signalsViewModel.updateSignals(booleen);
}
}));
'''