Added multiple file select
Added the ability to allow for multiple file selection on android filechooser
@@ -77,6 +77,9 @@ class AndroidFileChooser(FileChooser):
# default selection value
selection = None
+ # select multiple files
+ multiple = False
+
# mime types
mime_type = {
"doc": "application/msword",
@@ -141,6 +144,10 @@ class AndroidFileChooser(FileChooser):
Intent.CATEGORY_OPENABLE
)
+ # use putExtra to allow multiple file selection
+ if self.multiple:
+ file_intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, True)
+
# start a new activity from PythonActivity
# which creates a filechooser via intent
mActivity.startActivityForResult(
