This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
public enum Gender { | |
MALE, FEMALE | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun recognizeImage() { | |
val jokeImg = BitmapFactory.decodeResource(resources, R.drawable.joke_shampoo) | |
val inputJokeImg = InputImage.fromBitmap(jokeImg, 0) | |
val textRecognizer = TextRecognition.getClient() | |
textRecognizer.process(inputJokeImg) | |
.addOnSuccessListener { texts -> | |
run { | |
Log.d("MainActivity", "recognizeImage: ${texts.text}") | |
recognizedTextShow.text = texts.text |