0

I am trying to get GPS coordinates from Android wear watch (moto 360 sport). As a first step towards it, I need to connect to GoogleApiClient. Below is the code for the same. But the connection to GoogleApiClient is always failing with the error message.

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        setAmbientEnabled();

        mContainerView = (BoxInsetLayout) findViewById(R.id.container);
        mTextView = (TextView) findViewById(R.id.text);
        mClockView = (TextView) findViewById(R.id.clock);

        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addApi(Wearable.API)
                .addApi(LocationServices.API)
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .build();
    }

    @Override
    protected void onResume() {
        super.onResume();
        mGoogleApiClient.connect();
    }

    @Override
    protected void onPause() {
        super.onPause();
        mGoogleApiClient.disconnect();
    }

Connection Failed=>ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}

I looked at this. The accepted answer did not work for me. The google play services version of my mobile phone is 9.4.52(440-127739847) and the google play services in my watch is 8.7.01(2590918-534). I tapped on this version in my watch. But it checked for updates did not show up anything (Do I need wifi in my watch to check for updates and install the updates?). Since the accepted answer did not work, I moved on to the last answer of that thread. So I downloaded 8.7.01 (2590918-440) (though the last 3 numbers doesn't match). when I tried to install this apk in my mobile, I got Failure [INSTALL_FAILED_VERSION_DOWNGRADE] as my version of play services in my mobile is higher than that of watch. How should I proceed with this issue?

Your help is much appreciated. Thanks

Community
  • 1
  • 1
praneel
  • 241
  • 2
  • 14

1 Answers1

2

Some Android Wear watches (about 10%, according to polls) got stuck at lower Play Services versions. If your watch is one of them, neither pressing the version number, nor anything else will make it update. Google are aware of the issue (see here and here), and likely to find a solution soon (see here). Temporarily they advise not to use Play Sevices 9.x, until the problem is resolved.

Pay attention to the fact, that the wearable apk using 9.x, wrapped into the Application-release.apk will not be deployed on watches stuck at 8.x. It'll be waiting forever for the Play Services to update.

E.g. use:

compile "com.google.android.gms:play-services-location:8.4.0"

instead of

compile "com.google.android.gms:play-services-location:9.4.0"

in your build.gradle on both Application and Wearable sides.

It doesn't matter that your phone runs a higher version.

Piotr Miller
  • 311
  • 2
  • 12
  • my phone has play services 12.5 version while the watch has 9.4.52 version still i'm not able to connect – UserID0908 Apr 21 '18 at 09:57
  • Even my old Sony Smartwatch 3 runs 12.5.29 at the moment. You should try to update. Clicking the version number triggers attempt do download the latest version. Did you try? – Piotr Miller Apr 22 '18 at 19:58