Android Wearable.API is deprecated ? so what do we need to use to build the api client.
My current code is
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Wearable.API)
.build();
mGoogleApiClient.connect();
//From this the Wearable.API is deprecated.
I have gone through this link https://developers.google.com/android/reference/com/google/android/gms/wearable/Wearable#getDataClient(android.app.Activity,%20com.google.android.gms.wearable.Wearable.WearableOptions)
Here they have asked to change it to data client and message client.
So can anyone help me with some kind of example exactly how to do it ? Thanks and Regards,
Update : Is the following correct way ?
.addApi(Wearable.getDataClient(MainActivity.this).getApi())
.addApi(Wearable.getMessageClient(MainActivity.this).getApi())
If so then what is the use of interfaces of onMessageReceive() and onDataChange(). I mean I am already implementing them.