question

CB1216 avatar image
0 Votes"
CB1216 asked RobCaplan edited

Xamarin Forms Android App Barcode Stopped Working

Hello All

This past week I have been working on a Android App using Xamarin Forms and the ZXing NuGet package. At first it was a simple one page app that would read a QR/Barcode and return the result of that barcode to a label at the top of the screen, next I added another page with another QR/Barcode scanner that would read specific barcodes and make a call to a API to retrieve the correct information related to that Barcode, this worked great.

My next task was finding a way to get from the 1st page to the 2nd, at first I simply added a button that when pressed would take you from the 1st page to the 2nd. What I would like to do now is make this happen but via scanning certain QR codes related to a database.

My issue is that the 1st page has seemingly stopped scanning any QR/Barcode all together, I have replaced the code within the xaml.cs related to the 1st page with Nagivation.PushAsync(new SecondPage()); which previously worked with the button to get to the second page. I have also completely removed that code and tried to return the first page to its original state of reading barcodes and returning their value but again there is no result. I have also created a new project and rebuilt the app but I am getting the same issue. Hope someone can shed some light on this.

tl;dr
Added another page to Xamarin Forms Android barcode scanning app, after which the first page stopped scanning barcodes all together.

Thanks
C

dotnet-csharpdotnet-xamarin
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, CallumBeck. Could you please post the related function code? It'll help to reproduce the issue to get the cause.

0 Votes 0 ·

Hello JarvanZhang

Thankyou for your timely response, I managed to get it working over the weekend by rebuilding the project, I must have missed/miss-named something in the original.

  • C

1 Vote 1 ·

Congrats! And thanks for sharing the info.

0 Votes 0 ·

0 Answers