Although i took the code from firebase console and i'm pretty sure the firebase is properly integrated
FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);
FirebaseVisionTextRecognizer detector = FirebaseVision.getInstance()
.getOnDeviceTextRecognizer();
Task<FirebaseVisionText> result =
detector.processImage(image)
.addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {
@Override
public void onSuccess(FirebaseVisionText firebaseVisionText) {
// Task completed successfully
// ...
Toast.makeText(MainActivity.this, "Inn On Success Method", Toast.LENGTH_SHORT).show();
}
})
.addOnFailureListener(
new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
// Task failed with an exception
// ...
Toast.makeText(MainActivity.this, "Inn On failure Method", Toast.LENGTH_SHORT).show();
}
});
I added the toast messages just to check which method is executed.