Closed samirpramanik closed 3 years ago
Hi, any update?
Hi @samirpramanik
Apologies for the delay in our response.
With BlinkCard 2.0.0, we've migrated to AndroidX fragments.
In your application, you would need to use the androidx.appcompat:appcompat
library.
Also, your Activity will need to extend the AppCompatActivity
, which will give you access to the getSupportFragmentManager()
, which needs to be replaced with the getFragmentManager(). It will also return androidx.fragment.app.FragmentTransaction
.
The sample code would be:
mScanOverlay = createOverlay();
if (null == savedInstanceState) {
mRecognizerRunnerFragment = new RecognizerRunnerFragment();
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.recognizer_runner_view_container, mRecognizerRunnerFragment);
fragmentTransaction.commit();
} else {
mRecognizerRunnerFragment = (RecognizerRunnerFragment) getSupportFragmentManager().findFragmentById(R.id.recognizer_runner_view_container);
}
}
Also to note, this will also be written in the documentation after we've updated it.
Hope this helps.
Regards, Milan
Hello,
I have implemented Blink Card sdk 2.0.0 using the built-in fragment(RecognizerRunnerFragment). However, when i am trying to replace the frame layout with the RecognizerRunnerFragment, i am getting an error :
My code is as below :
mRecognizerRunnerFragment = new RecognizerRunnerFragment(); FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fragmentTransaction.replace(R.id.recognizer_runner_view_container, mRecognizerRunnerFragment); fragmentTransaction.commit();
Please help fix this.
Thanks, Samir