KEMBAR78
Missing API IsSupported in Vibration and HapticFeedback by framinosona · Pull Request #30471 · dotnet/maui · GitHub
Skip to content

Conversation

framinosona
Copy link

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

While these exist :

  • Accelerometer.IsSupported
  • Barometer.IsSupported
  • Compass.IsSupported
  • Gyroscope.IsSupported
  • Magnetometer.IsSupported
  • OrientationSensor.IsSupported

These were missing :

  • HapticFeedback.IsSupported (Accessible only through HapticFeedback.Default.IsSupported)
  • Vibration.IsSupported (Accessible only through Vibration.Default.IsSupported)

Introduces a static IsSupported property to check if vibration is supported on the device across different platforms. Updates public API definitions accordingly.

Aligning Vibration API with other Device capabilities API. Vibration was different from Vibration.Default.
Aligns static API with other platform services
@Copilot Copilot AI review requested due to automatic review settings July 7, 2025 15:52
@framinosona framinosona requested a review from a team as a code owner July 7, 2025 15:52
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jul 7, 2025
@dotnet-policy-service
Copy link
Contributor

Hey there @@framinosona! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds IsSupported properties to the Vibration and HapticFeedback APIs and updates the public API manifests to expose these new getters.

  • Introduces Vibration.IsSupported static property forwarding to Current.IsSupported.
  • Introduces HapticFeedback.IsSupported static property forwarding to Current.IsSupported.
  • Updates all PublicAPI.Unshipped.txt files to include the new getters for both APIs.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Essentials/src/Vibration/Vibration.shared.cs Added public static bool IsSupported property
src/Essentials/src/HapticFeedback/HapticFeedback.shared.cs Added public static bool IsSupported property
src/Essentials/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt Exposed HapticFeedback.IsSupported.get and Vibration.IsSupported.get
src/Essentials/src/PublicAPI/net/PublicAPI.Unshipped.txt Exposed HapticFeedback.IsSupported.get and Vibration.IsSupported.get
src/Essentials/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt Exposed HapticFeedback.IsSupported.get and Vibration.IsSupported.get
src/Essentials/src/PublicAPI/net-tizen/PublicAPI.Unshipped.txt Exposed HapticFeedback.IsSupported.get and Vibration.IsSupported.get
src/Essentials/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt Exposed HapticFeedback.IsSupported.get and Vibration.IsSupported.get
src/Essentials/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt Exposed HapticFeedback.IsSupported.get and Vibration.IsSupported.get
src/Essentials/src/PublicAPI/net-android/PublicAPI.Unshipped.txt Exposed HapticFeedback.IsSupported.get and Vibration.IsSupported.get

@jsuarezruiz jsuarezruiz added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label Jul 8, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho rmarinho merged commit 24c6d63 into dotnet:net10.0 Jul 11, 2025
122 of 129 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info community ✨ Community Contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants