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

ProximityDevice NFC events not triggered / NFC doesn't work at all #4356

Open
baaaaif opened this issue Apr 19, 2024 · 10 comments
Open

ProximityDevice NFC events not triggered / NFC doesn't work at all #4356

baaaaif opened this issue Apr 19, 2024 · 10 comments

Comments

@baaaaif
Copy link

baaaaif commented Apr 19, 2024

Describe the bug

We have an app that we migrated from UWP to WinUI 3 a while ago.
Unfortunately, we discovered that with the WinUI 3 app the ProximityDevice NFC feature no longer triggers events / no longer works at all. We use simple code that can be found in many examples and have set
<DeviceCapability Name="proximity"/>

var proximityDevice = Windows.Networking.Proximity.ProximityDevice.GetDefault();
var messageSubscriptionId = proximityDevice.SubscribeForMessage("NDEF", (device, message) =>
{
    Console.WriteLine(message.Data.ToArray());
});

this works in UWP and doesn't work in WindowsAppSDK/WinUI3 App
See min Repo examples
Works: https://github.com/minze-it/BlankProximityUWP
Doesn't work: https://github.com/minze-it/BlankProximityMaui

Steps to reproduce the bug

  • Start min repo apps
  • Click Button
  • Try read a NDEF 213/215/216 Tag which contains a NDEF message

Expected behavior

SubscribeForMessage delegate handler is invoked

Screenshots

No response

NuGet package version

Windows App SDK 1.5.2: 1.5.240404000

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

Visual Studio 2022

Additional context

What do I need to do to use NFC in a WindowsAppSDK app, or where should I report a bug for errors affecting Windows.Networking.Proximity?

@DarranRowe
Copy link

DarranRowe commented Apr 19, 2024

or where should I report a bug for errors affecting Windows.Networking.Proximity?

As Janine Zhang mentioned in the Q&A post and I actually mentioned in the post you originally posted on the Microsoft.UI.Xaml repository, you really should be reporting this using the Feedback Hub application that is part of Windows. This is where Windows related bug reports should go.

Screenshot 2024-04-19 120832

@baaaaif
Copy link
Author

baaaaif commented Apr 19, 2024

I did - from my private notebook... Not even a reaction or comment within nealy 2 month. Nothing. Nobody at Microsoft cares, like the old 3K closed "stale" issues in the WinUI xaml repository.

Business notebook:
image

I'm going around in circles trying to find a contact person who is actually willing to deal with a reported problem.
And our customer waits and waits for the feature to work again.

...instead of someone simply taking the courage to pass it on internally to the appropriate department

@baaaaif
Copy link
Author

baaaaif commented Apr 19, 2024

I think this repository is the right place
image

@DarranRowe
Copy link

I think this repository is the right place

If you look around, then you will find that this is part of the footer for this template. It is even present for CoreApplicationView. This is telling for two reasons.

  1. The Windows App SDK doesn't support UWP applications.
  2. CoreApplicationView isn't available in desktop applications. This is documented too.

But I guess that right now you would need someone from Microsoft to comment on this issue.

@minze-it
Copy link

1. The Windows App SDK doesn't support UWP applications.

2. CoreApplicationView isn't available in desktop applications. This is [documented too](https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-supported-api#core-unsupported-classes).

Could you give us a more detailed explanation on those two reasons? It's not about UWP supporting WinAppSDK or not, It's about the Proximity Device as part of the WinRT-API that is working as part of a UWP-App but simply is not when used inside a WinAppSDK-App. And regarding to the mentioned docs Windows.Networking.Proximity.ProximityDevice is not unsupport so everyone assumes it's supported.

@DarranRowe
Copy link

DarranRowe commented Apr 19, 2024

Could you give us a more detailed explanation on those two reasons? It's not about UWP supporting WinAppSDK or not, It's about the Proximity Device as part of the WinRT-API that is working as part of a UWP-App but simply is not when used inside a WinAppSDK-App. And regarding to the mentioned docs Windows.Networking.Proximity.ProximityDevice is not unsupport so everyone assumes it's supported.

To put it bluntly:

Screenshot 2024-04-19 150231

CoreApplicationView, which is a UWP only runtime class has the exact same link for getting product support. As shown, CoreApplicationView is not supported in desktop applications. The Windows App SDK only supports being used in desktop applications.

This means that a UWP only class is being directed to a support forum that does not officially support that runtime class. This means that there is a mistake in the template, and they probably mistook it for the non existent Windows SDK tag.

But as I stated, you need someone from Microsoft to comment here.

@codendone
Copy link
Contributor

I've contacted owners of the Proximity APIs to ask for help with this issue.

@baaaaif
Copy link
Author

baaaaif commented May 16, 2024

I've contacted owners of the Proximity APIs to ask for help with this issue.

wanted to ask briefly if they have already commented on the problem. Thank you

@minze-it
Copy link

Another month over... Some info would by greatly appreciated!
Do the owners of the Proximity API have any idea or plan?

@itmsau01
Copy link

I am encountering the same issue as described above. I would appreciate it if anyone could share any tips or solutions that might help in resolving this problem.

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

No branches or pull requests

5 participants