Last active
October 6, 2019 05:33
-
-
Save ritshpatidar/eabe45be289a5c646066029a362e6cc9 to your computer and use it in GitHub Desktop.
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
//A code for article published at calloftechies.com | |
private fun getNames() : ArrayList<String?>{ | |
var files = myDirectory.listFiles() | |
val fileNames : ArrayList<String?> = ArrayList() | |
for(file in files){ | |
fileNames.add(file.getName()) | |
} | |
return fileNames | |
} | |
/* | |
It will not get called directly, you have to call it. | |
I have explained MethodChannel in my last article I was talking about, you can get | |
the code from there. You also have to give permissions to read | |
external storage in AndroidManiFest.xml. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment