Vika L.
Vika L.

Reputation: 285

Binder for service extending WearableListenerService

I'm developing android wear project with Service extends WearableListenerService. When I'm trying to add Service binder I see this error

private final IBinder mBinder = new LocalBinder();

 public class LocalBinder extends Binder {
    DataLayerListenerService getService() {
        return DataLayerListenerService.this;
    }
 }

@Override
public IBinder onBind(Intent intent) {
     return mBinder;
}


 Error:(196, 20) error: onBind(Intent) in DataLayerListenerService cannot override onBind(Intent) in WearableListenerService
overridden method is final

Is it possible to bind WearableListenerService somehow? How to pass data from WearableListenerService to Activity without using broadcasts?

Upvotes: 2

Views: 918

Answers (1)

Junghoon Lee
Junghoon Lee

Reputation: 154

You not have to use Bind.

You can communicate through mGoogleApiClient.

Sending data from an Activity to WearableListenerService

This Answer help your problem solve.

Upvotes: 1

Related Questions