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

While using Navigation in MAUI on Android NFC tag is not scanned #140

Open
francescobuffetti opened this issue May 26, 2023 · 4 comments
Open

Comments

@francescobuffetti
Copy link

Description

I am making a MAUI application which use Navigation. I have a button in the MainPage which navigates to ScanNFC page. In this page, the scan is not working. If ScanNFC page is the root page, then everything is fine and the tag is scanned.

Steps to Reproduce

  1. Create two pages.
  2. Create a button in the first page which pushes to the ScanNFC page
  3. Try to scan the NFC tag

Expected Behavior

The tag should be scanned as normal.

Actual Behavior

The tag is not scanned if i am using navigation, but it is scanned if ScanNFC page is the root page.

@Rigo09
Copy link

Rigo09 commented Jul 20, 2023

Hello, did you manage to solve this error?

@Rigo09
Copy link

Rigo09 commented Jul 28, 2023

Hi @francescobuffetti , I ran into this same problem in a xamarin forms app. I did was that in the button that opens the page ReadPage.xaml (scanner) I changed:
` private async void OnOpcion1ClickedAsync(object sender, EventArgs e)
{

    await Navigation.PushAsync(new ReadPage());
}`

by
` private async void OnOpcion1ClickedAsync(object sender, EventArgs e)
{

    await Navigation.PushModalAsync(new ReadPage());
}`

Maybe this same thing can be giving problems in MAUI

@mach-9
Copy link

mach-9 commented Nov 2, 2023

Hi Francis,

I'm trying to do the same thing here, but I'm having a problem trying to start the listener on the page load instead of pressing a button to start listening for an NFC tag.

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.

Any luck with this?

Thanks

@kattbussen
Copy link

Any news on this?
Fairly certain this issue persists and is causing trouble for me.

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

4 participants