0 Replies Latest reply on Sep 28, 2017 7:57 PM by Matthew Golder

    Using Barcode API in Xamarin and sharing across activities.

    Matthew Golder



      I've written a barcode app with multiple activities that do scanning. The issue we are having is that the performance switching between activities is slow eg Activity 1 starts Activity 2, Activity 1 releases resources and Activity 2 reacquires them when starting, and vice versa. This is proving to be too slow, especially when returning from Activity 2 and going back to Activity 1.


      Another approach that could be considered is to have one activity for the app and all the other work done as Fragments, however I'm not aware if there are any gotchas with that kind of approach for a large application - eg 20-30 screens with half a dozen or so of them needing to interact with the scanner.


      There are some old threads on the topic which provide some high level ideas, but I was wondering if there are any Xamarin samples available where the scanner is shared between more than one activity


      One topic mentioning this already is Barcode API - very slow


      There are some pointers here https://developer.zebra.com/message/88185?et=watches.email.thread#88185 in how to implement a listener, but it is not clear what one gains by this as there is still the full activity doing all the work, and the pause in the main activity will stop the scanner being used in another activity.



      Matthew Golder