Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActivityRecognitionClient no longer accessible #834

Closed
pierre-galaup opened this issue Jan 30, 2024 · 1 comment
Closed

ActivityRecognitionClient no longer accessible #834

pierre-galaup opened this issue Jan 30, 2024 · 1 comment

Comments

@pierre-galaup
Copy link

Xamarin.Android Version (eg: 6.0):

All

Operating System & Version (eg: Mac OSX 10.11):

All

Google Play Services Version

Xamarin.GooglePlayServices.Location >= 121.0.1

Describe your Issue

Hello,

Since version 121.0.1 of Xamarin.GooglePlayServices.Location, we no longer have access to the ActivityRecognitionClient.

Is there a new way to use the ActivityRecognitionClient?

I've attached a project that works in 120.0.0.2 but no longer in 121.0.1 or higher.

Thank you

Relevant information

Add relevant project settings from *.csproj file:

Packages used:

		<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
		<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
		<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
		<PackageReference Include="Xamarin.GooglePlayServices.Location" Version="121.0.1.4" />

Minimal Repro Code Sample

ActivityRecognitionClientSample.zip

Steps to Reproduce (with link to sample solution if possible):

Open the solution. Solution does not build.

Include any relevant Exception Stack traces, build logs, adb logs:

@moljac
Copy link
Member

moljac commented Apr 30, 2024

generated/com.google.android.gms.play-services-location/obj/Release/net7.0-android/generated/src/Android.Gms.Location.IActivityRecognitionClient.cs
generated/com.google.android.gms.play-services-location/obj/Release/net6.0-android/generated/src/Android.Gms.Location.IActivityRecognitionClient.cs
generated/com.google.android.gms.play-services-location/obj/Release/monoandroid12.0/generated/src/Android.Gms.Location.IActivityRecognitionClient.cs
	public partial interface IActivityRecognitionClient : global::Android.Gms.Common.Apis.IHasApiKey {

ActivityRecognitionClient is interface now and not recommended anymore.

Activity Recognition Transition API
The Transition API is the preferred way of using Activity Recognition because it improves accuracy, consumes less power, and enhances engineering productivity. It is suitable for all use cases and developers get notified when a user activity has changed.

https://developers.google.com/android/reference/com/google/android/gms/location/ActivityRecognitionClient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants