Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TextDetectionTask extends AsyncTask<String, String, Void> {
- private static final String TAG = TextDetectionTask.class.getSimpleName();
- private Context context;
- private DatabaseReference dbRef;
- public TextDetectionTask(Context context, DatabaseReference dbRef) {
- this.context = context;
- this.dbRef = dbRef;
- }
- @Override
- protected Void doInBackground(String... strings) {
- String folderName = strings[0];
- File folder = new File(Environment.getExternalStorageDirectory().getPath() + "/images/" + folderName);
- File[] images = folder.listFiles();
- FirebaseVisionImage image = null;
- for(File file: images) { // images gets null
- final String imageName = file.getName().split(".jpg")[0];
- // ....
- }
- return null;
- }
- }
Add Comment
Please, Sign In to add comment