AppWerft / Ti.FilePicker

Titanium module for retreiving files from file system
Other
5 stars 7 forks source link

Object #<Filepicker> has no method 'getFileSelectDialog' #3

Closed MahmoudElmoghazy closed 7 years ago

MahmoudElmoghazy commented 7 years ago

When i try to run the file picker it return this issue Object # has no method 'getFileSelectDialog'

AppWerft commented 7 years ago

Let us screen share

MahmoudElmoghazy commented 7 years ago

screen shot 2017-05-11 at 4 52 07 pm Check thus

AppWerft commented 7 years ago

You are right: this are the methods: getFile()

MahmoudElmoghazy commented 7 years ago

Thanks put this option doesn't make any thing it doesn't work

MahmoudElmoghazy commented 7 years ago

I finally found the solution

var intent = Ti.Android.createIntent({
        action: Ti.Android.ACTION_GET_CONTENT,
        type: "application/pdf"
      });

      var x = Ti.Android.createIntentChooser(intent, "Select");
      $.win.getActivity().startActivityForResult(x, function(e) {

        try {
          var file = Ti.Filesystem.getFile(e.intent.data);
          Ti.API.info("file is: " + file);
        } catch (error) {
          console.error("This is error : " + error);
        }
      });
balasug commented 4 years ago

I finally found the solution

var intent = Ti.Android.createIntent({
        action: Ti.Android.ACTION_GET_CONTENT,
        type: "application/pdf"
      });

      var x = Ti.Android.createIntentChooser(intent, "Select");
      $.win.getActivity().startActivityForResult(x, function(e) {

        try {
          var file = Ti.Filesystem.getFile(e.intent.data);
          Ti.API.info("file is: " + file);
        } catch (error) {
          console.error("This is error : " + error);
        }
      });

It is not working ..