Closed Morteza-Rastgoo closed 1 year ago
Hi @Morteza-Rastgoo
the current version of BlinkID SDK does not support this completely. In order to make it work you have to implement RecognizerRunnerFragment.ScanningOverlayBinder
in your Activity and create a public method where you will initialize RecognizerRunnerFragment
like this
public void initRecognizerRunnerFragment() {
if (recognizerRunnerFragment == null) {
recognizerRunnerFragment = new RecognizerRunnerFragment();
getSupportFragmentManager().beginTransaction()
.add(R.id.recognizer_runner_view_container, recognizerRunnerFragment)
.addToBackStack(null)
.commit();
}
}
This method should be called from your fragment ((YourActivity)requireActivity()).initRecognizerRunnerFragment();
.
We are aware that this is not the best approach and will try to fix it in one of the next releases.
Best regards, Sandra
Thanks for your fast response. I'd problems with that approach as the activity should be involved in the current fragment's logic and should implement listeners to listen to the results. So, It would be great to change the functionality to support for fragments alone and leave the activity out of this process.
Hi @Morteza-Rastgoo
yes, you are right and we are sorry for the issue. We will let you know as soon as it will be fixed, unfortunately, we can't fit it in our next release (v5.8.0), but it will be selected for one of the future releases.
Best regards, Sandra
Thank you! it would be great.
This issue was closed because it has been inactive for such a long time. If the issue persists, please open a new one.
In the readme there is a sample for Built-in fragment (RecognizerRunnerFragment) that is implementing fragment inside activity. If I want to use it in a fragment what should I do?