Reputation: 8924
Implemented this sample on mobile & tablet everything is perfect ! But whit Android TV ADT-1 v5.0.2 build LRX22G these eloquent message shows up.
GmsClient: unable to connect to service: com.google.android.gms.nearby.messages.service.NearbyMessagesService.START
D/NearbyMessagesClient: Failed to emit client lifecycle event ACTIVITY_STOPPED due to GmsClient being disconnected
NearbyMessagesClient: Failed to emit client lifecycle event CLIENT_DISCONNECTED due to GmsClient being disconnected
The callback :
@Override public void onConnectionFailed(@NonNull ConnectionResult connectionResult)
Outputs :
ConnectionResult{statusCode=INTERNAL_ERROR, resolution=null, message=null}
Like I said, everything works in the mobile module. I doubled checked API_KEY, gradle dependencies, Manifest meta, nope, I even created a listing for the APK and created a Game on Google Play Console, nothing.
Any ideas ? Thanks !
Upvotes: 3
Views: 2302
Reputation: 10062
Had (actually still have) same problem with Sony KDL-55W75xC Android TV.
Pulled down com.google.android.gms
package from both TV and HTC phone and sadly one from TV doesn't contain NearbyMessagesService
service at all. It's not included in AndroidManifest.xml
file. Also there is no code for it in the APK file.
Both packages seem to have similar version name:
Sony:
versionCode: '8703836' versionName: 8.7.03 (2645110-836)
HTC:
versionCode: '8703238' versionName: 8.7.03 (2645110-238)
But one on Sony TV has higher versionCode. Sadly because of that, it's not possible to update gms
package on the TV using one from HTC because of INSTALL_FAILED_VERSION_DOWNGRADE
error.
Upvotes: 2