Juan Vazquez
Juan Vazquez

Reputation: 71

How test connection and disconection between Mobile App and Wear app

Currently i have a WearableService that implements onCapabilityChanged method that receive this events automatically (At least I think so) but i've been trying to fire it with emulators but it doesn't execute the method. Is necessary test with a real device?

I have a single service in my manifest (Currently i receive dataUpdates and messages without problems)

Upvotes: 0

Views: 55

Answers (2)

claired4l
claired4l

Reputation: 64

  • Have you added the corresponding intent as described in point 2. of your link?
<intent-filter>
           <action android:name="com.google.android.gms.wearable.CAPABILITY_CHANGED" />
           <data android:scheme="wear" android:host="*"/>
</intent-filter>
  • what happens when you merely use the getCapability method? Do you manage to see the right devices?
capabilityClient
     .getCapability(capability, capabilityClient.FILTER_REACHABLE);

Upvotes: 0

claired4l
claired4l

Reputation: 64

I don't think you need to test it with a physical device, it should work with an emulator.

Have you already checked that your two applications share the same applicationId and were signed with the same key? That's a requirement to be able to use the Data Layer API.

Upvotes: 0

Related Questions