Guest User

Untitled

a guest
May 20th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. public class TextDetectionTask extends AsyncTask<String, String, Void> {
  2.  
  3. private static final String TAG = TextDetectionTask.class.getSimpleName();
  4.  
  5. private Context context;
  6. private DatabaseReference dbRef;
  7.  
  8. public TextDetectionTask(Context context, DatabaseReference dbRef) {
  9. this.context = context;
  10. this.dbRef = dbRef;
  11. }
  12.  
  13. @Override
  14. protected Void doInBackground(String... strings) {
  15. String folderName = strings[0];
  16.  
  17. File folder = new File(Environment.getExternalStorageDirectory().getPath() + "/images/" + folderName);
  18. File[] images = folder.listFiles();
  19.  
  20. FirebaseVisionImage image = null;
  21.  
  22. for(File file: images) { // images gets null
  23.  
  24. final String imageName = file.getName().split(".jpg")[0];
  25. // ....
  26.  
  27. }
  28. return null;
  29. }
  30. }
Add Comment
Please, Sign In to add comment