androidgoogle-mapsgoogle-apiactivity-recognitiongoogle-location-services

Which API is really depreciated ActivityRecognitionApi or ActivityRecognitionClient


According to Google Google APIs for Android the ActivityRecognitionApi interface is deprecated and need to use the ActivityRecognitionClient interface. But other sources saying that the ActivityRecognitionClient is depricated and need to use the ActivityRecognitionApi interface insted. I am confused :(

And many other samples on the internet is using the ActivityRecognitionApi interface.

And when we using the ActivityRecognitionClient interface the periodic update is not getting only the initial time we will get the update , But he ActivityRecognitionApi interface update is getting properly.

Which one we need to use ? , If we need to uses ActivityRecognitionClient kindly provide a sample code of working Application/Code .


Solution

  • In version 11.8.0 of play services ,ActivityRecognitionApi is deprecated. You should use the new interface , So when the next version comes, you don't have the risk to forcefully update it to the new interface.