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

CrossNFC.Current.StartListening() on Content Page load not working - .NET Maui Android App. #149

Open
mach-9 opened this issue Nov 2, 2023 · 0 comments

Comments

@mach-9
Copy link

mach-9 commented Nov 2, 2023

Description
I would like to automatically start listening to NFC tags when my page is accessed, not activating it by pressing a button. I've tried different measures, in the constructor of the page, but OnResume must be fired after OnCreate. Tried to call it in the constructor, but it fails.

My app consists of 3 pages, login, list and a detail page where I would like to read the NFC tag. Also using navigation to go between pages, ex.:
await Navigation.PushModalAsync(new ScanBarcodeView(_UserService, _TestService));

I'm using DI for all the service layers, tried also to DI it into my page, but to no avail.

The logic for the page is, start listening for tags, read and then write to the tag, close listener and redirect to previous page.

Basic Information

  • Version with issue: Current version Plugin.NFC 0.1.26
  • Last known good version: U/K
  • IDE: VS 2022 17.8
  • Platform Target Frameworks:
  • Android: 13.2.2.0
  • Nuget Packages: Plugin.NFC 0.1.26
  • Affected Devices: Samsung S10

Any help is much appreciated.

Thank you.

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

1 participant