Releases: spacecowboy/NoNonsense-FilePicker
4.2.1
4.2.0
Added
- Made OK/Cancel strings into library strings for easy overridability #157 (spacecowboy)
Changed
- Update build tools to 26.0.2 and update Dropbox sample to v2 API #155 (mitchyboy9)
4.1.0
Added
-
added a static helper method for parsing activity results #138 (spacecowboy)
4.0.1
Fixed
- Destroy Loader after finish to avoid clearing selections #137 (spacecowboy)
4.0.0
Breaking changes
-
You are now required to define a
FileProvider
in your manifest for the SD-card picker 101aa70Due to recent changes in Android 7.0 Nougat, bare File URIs can no longer be returned in a safe way. This change requires you to add an entry to your manifest to use the included
FilePickerFragment
and change how you handle the results.- You need to add the following to your app's
AndroidManifest.xml
:
<provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/nnf_provider_paths" /> </provider>
- Then you must change your result handling. Here is a code snippet illustrating the change for a single result (the same applies to multiple results):
protected void onActivityResult(int requestCode, int resultCode, Intent intent) { // The URI will now be something like content://PACKAGE-NAME/root/path/to/file Uri uri = intent.getData(); // A new utility method is provided to transform the URI to a File object File file = com.nononsenseapps.filepicker.Utils.getFileForUri(uri); // If you want a URI which matches the old return value, you can do Uri fileUri = Uri.fromFile(file); // Do something with the result... }
This change was required in order to fix
FileUriExposedException
being thrown on Android 7.0 Nougat, as reported in #115 and #107.Please see the updated activity in the sample app for more examples.
- You need to add the following to your app's
Changed
-
Reading multiple selections via
intent.getStringArrayListExtra(AbstractFilePickerActivity.EXTRA_PATHS)
is now available for all Android versions 4fef8f8This field was previously only populated on versions below Android 4.3. If you target Android versions before 4.3, you can now use a single method of getting the results instead of switching based on version number.
4.0.0-beta1
Breaking changes
-
You are now required to define a
FileProvider
in your manifest for the SD-card picker 101aa70Due to recent changes in Android 7.0 Nougat, bare File URIs can no longer be returned in a safe way. This change requires you to add an entry to your manifest to use the included
FilePickerFragment
and change how you handle the results.- You need to add the following to your app's
AndroidManifest.xml
:
<provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/nnf_provider_paths" /> </provider>
- Then you must change your result handling. Here is a code snippet illustrating the change for a single result (the same applies to multiple results):
protected void onActivityResult(int requestCode, int resultCode, Intent intent) { // The URI will now be something like content://PACKAGE-NAME/root/path/to/file Uri uri = intent.getData(); // A new utility method is provided to transform the URI to a File object File file = com.nononsenseapps.filepicker.Utils.getFileForUri(uri); // If you want a URI which matches the old return value, you can do Uri fileUri = Uri.fromFile(file); // Do something with the result... }
This change was required in order to fix
FileUriExposedException
being thrown on Android 7.0 Nougat, as reported in #115 and #107.Please see the updated activity in the sample app for more examples.
- You need to add the following to your app's
Changed
-
Reading multiple selections via
intent.getStringArrayListExtra(AbstractFilePickerActivity.EXTRA_PATHS)
is now available for all Android versions 4fef8f8This field was previously only populated on versions below Android 4.3. If you target Android versions before 4.3, you can now use a single method of getting the results instead of switching based on version number.
3.1.0
Changelog
Changes
3.0.1
Added
- Add ability to define a list divider in theme #99 (spacecowboy)
Changed
Fixed
- Fix some of the samples #108 (spacecowboy)
- Use
srcCompat
for vector drawables #112 (spacecowboy)
3.0.0
Changelog
Implemented enhancements:
- Select one file with a single click #92 (rastikw)
- Add ability to enter a new filename #83 (spacecowboy)
Closed issues:
- Add ability to input filename #82
New mode
- A new mode has been added which matches the traditional
Save as
dialog in desktop programs. This new mode has a text field which allows the user to input a desired filename. - Related to the new mode, a new option called
Allow existing
has been added. - Moved part of FilePickerFragment.isItemVisible() into AbstractFilePickerFragment.isItemVisible() to allow any subclass to inherit behavior with regards to modes and options.
Breaking changes
- To support the new mode,
AbstractFilePickerFragment
has been given additional parameters in constructor and arg methods, see for example setArgs(). If you have no interest in the newSave as
-mode, either true or false is fine to hardcode as the new parameter's value.
2.5.3
2.5.3 (2016-06-09)
Implemented enhancements:
- Add paths to permission and refresh methods #85
- Add FastScroller sample implementation #89 (spacecowboy)
- Add a getItem method to FileItemAdapter #88 (spacecowboy)
Fixed bugs:
- Crash while creating folder in dropbox sample #76
Closed issues:
- Fast Scroll #87