Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@juliocbcotta
Copy link
Contributor

Description

This PR enables the plugin to use getApplicationSupportDirectory on android.

on iOS apple says : https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html

Put app-created support files in the Library/Application support/ directory. In general, this directory includes files that the app uses to run but that should remain hidden from the user. This directory can also include data files, configuration files, templates and modified versions of resources loaded from the app bundle.

This is very close of the usage of getFilesDir on Android. It is private to the app, there is no sync and the app can use to save files that are not temporary (cache).

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the [Flutter Style Guide].
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the [CLA].
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

I don't know if it is a breaking change. What worked before should keep working know, but it does change the behavior of a method.

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

Copy link
Contributor

@collinjackson collinjackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This looks good to me. I've added a bit more to the CHANGELOG to cover the unrelated change.

@@ -1,3 +1,7 @@
## 1.2.0

* Android: `getApplicationSupportDirectory` enabled by using `getFilesDir`.
Copy link
Contributor

@collinjackson collinjackson Jul 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Android: `getApplicationSupportDirectory` enabled by using `getFilesDir`.
* On Android, `getApplicationSupportDirectory` is now supported and uses `getFilesDir`.
* `getStorageDirectory` now returns `null` instead of throwing an exception if no external files directory is available.

@collinjackson collinjackson merged commit a0acfa7 into flutter:master Jul 24, 2019
mithun-mondal pushed a commit to bKash-developer/archived_plugins that referenced this pull request Aug 6, 2019
…on Android (flutter#1891)

* add support to access android filesDir
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants