Skip to content

Titanium Module for working with the Android file picker from Internal/External storage.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt
Notifications You must be signed in to change notification settings

qalbit/TiExplorer

TiExplorer Module

The TiExplorer module enables you to read files from Internal/External storage and save in your application specific folder which you selected.

This project can be found on github at https://github.com/wecobi/TiExplorer.

Get it gitTio

Download the latest distribution ZIP-file and consult the Titanium Documentation on how install it, or simply use the gitTio CLI:

$ gittio install ti.explorer

Before you start

  • This is an Android module designed to work with Titanium SDK 7.0.0 or greater.

Accessing the TiExplorer Module

To access this module from JavaScript, you would do the following:

var TiExplorer = require("ti.explorer");

Method

selectFile


TiExplorer.selectFile({
	mimeType: "application/vnd.ms-excel",
	location: TiExplorer.EXTERNAL_STORAGE,
	onSuccess: function(e) {
		if(e.status == TiExplorer.RESULT_OK) {
			// Success Received
			var fileObj = e.file || null;
			if(fileObj != null) {
				alert("File Created Successfully!");
			}
		}
	},
	onError: function(e) {
		Ti.API.info("onError>>>> " + JSON.stringify(e));
	}
});

You can create an request for SelectFile using below properties

  • mimeType (Optional) (String) MimeType of file you want to read. (Default, /)
  • location (Optional) (Constant) TiExplorer Defined Constant used to give location of file. (Default, CACHE_DIRECTORY)
  • onSuccess (Required) (Function) Successful response, then you can get response in here.
  • onSuccess (Required) (Function) An Error response you get here.

Constant

Result Response status

  • RESULT_OK
  • RESULT_CANCELED
  • RESULT_ERROR

Storage location

  • EXTERNAL_STORAGE
  • CACHE_DIRECTORY
  • DATA_DIRECTORY
  • EXTERNAL_CACHE_DIRECTORY

Author

Licensing & Support

This project is licensed under the MIT approved License. For details please see the license associated with each project.

About

Titanium Module for working with the Android file picker from Internal/External storage.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Code of conduct

Stars

Watchers

Forks

Packages

No packages published