use of sugar.free.sightparser.handling.ServiceConnectionCallback in project SightRemote by TebbeUbben.
the class OngoingNotificationService method onCreate.
@Override
public void onCreate() {
serviceConnector = new SightServiceConnector(this);
serviceConnector.setConnectionCallback(new ServiceConnectionCallback() {
@Override
public void onServiceConnected() {
statusChanged(serviceConnector.getStatus());
}
@Override
public void onServiceDisconnected() {
statusChanged(Status.DISCONNECTED);
}
});
serviceConnector.addStatusCallback(this::statusChanged);
serviceConnector.connectToService();
}
Aggregations