thegrizzlylabs / geniusscan-sdk-demo

Demo apps for Genius Scan SDK
30 stars 38 forks source link

Way to show the ScanFragment without needing Activity to implement ScanFragment.CameraCallbackProvider #74

Closed soymonitus closed 8 months ago

soymonitus commented 1 year ago

Hi, I want to integrate the ScanFragment into a React Native application, creating it as a View that can be embedded into a React Native view hierarchy. I found that it is possible to add Fragments to a FrameLayout and return that as my custom view to show in React. The problem comes when the ScanFragment needs the parent activity or fragment to implement the CallbackProvider, which is impossible as I don't have access to the parent Activity. Is there any way of setting up GeniusScan to allow me to show the scan view without needed the callback?

guillaume-tgl commented 1 year ago

It's also possible to provide the CameraCallback via the parent fragment of the ScanFragment. Have you tried to create a Fragment that would implement CameraCallbackProvider and contain the ScanFragment?