And when I tried the next release (4 dot), I got the Didn't find class "androidx.core.content.ContextCompat" error. I'm not in a position to switch to androidx with this project right now, but would like to give the user the ability to turn on the torch.
But when I look at IntentIntegrator 3.6.0 source, I don't see setTorchEnabled() is there.
What's the easiest way to get the torch working without going to androidx?
IntentIntegrator integrator = new IntentIntegrator(this);
integrator.addExtra("TORCH_ENABLED", true); // Doesn't work
integrator.setPrompt("Scan the Touchless Menu QR code");
integrator.setTimeout(8000);
integrator.setOrientationLocked(true);
//integrator.setTorchEnabled(true); // Doesn't compile in 3.6.0
integrator.initiateScan();
I've been using this configuration:
And when I tried the next release (4 dot), I got the
Didn't find class "androidx.core.content.ContextCompat"
error. I'm not in a position to switch to androidx with this project right now, but would like to give the user the ability to turn on the torch.From November of 2018, I see #406 [https://github.com/journeyapps/zxing-android-embedded/commit/a4dfc2fca431696302c4d2d6ef90532bc9d4a68d] which looks like it should be available because 3.6.0 is dated September of 2019.
But when I look at IntentIntegrator 3.6.0 source, I don't see
setTorchEnabled()
is there.What's the easiest way to get the torch working without going to androidx?