unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.76k stars 706 forks source link

`FileOpenPicker` incorrectly shows `SettingsIdentifier` and `SuggestedStartLocation` as implemented #5893

Open pkar70 opened 3 years ago

pkar70 commented 3 years ago

Current behavior

At least on Android, FileOpenPicker has missing not implemented attribute for SettingsIdentifier and SuggestedStartLocation.

Expected behavior

These two settings should be marked as unimplemented, and decision if it can be ignored should be left to app programmer. Or, better, these settings should be implemented.

How to reproduce it (as minimally and precisely as possible)

Workaround

None.

Environment

Nuget Package:

Nuget Package Version(s):

Affected platform(s):

IDE:

Relevant plugins:

Anything else we need to know?

Youssef1313 commented 3 years ago

Looks like it's now implemented with https://github.com/unoplatform/uno/pull/5237/files#diff-25a01b26e1efd8cc1cee15bdfaad01d041a59fd807e03467780df92da8076bbeR27-R30.

GitHub
FileOpenPicker, FileSavePicker on Skia WPF, collections, common properties by MartinZikmund · Pull Request #5237 · unoplatform/uno
GitHub Issue (If applicable): related to #3916, #508, #3215, closes #5234, closes #5235, closes #5239 PR Type What kind of change does this PR introduce? Feature What is the current behavior? Fi...
pkar70 commented 3 years ago

Yes, SettingsIdentifier for Android is already implemented - this Issue was created just before I extracted SettingsIdentifier from my old FileOpenPicker PR #2896, SuggestedStartLocation is harder to implement now, as Android changed API.

Youssef1313 commented 3 years ago

@pkar70 I thought both are now implemented?

pkar70 commented 3 years ago

It is only marked as implemented. Android code doesn't use this value at all. Code in #2896 implements SuggestedStartLocation, by using Android.OS.Environment.GetExternalStoragePublicDirectory. But This method was deprecated in API level 29, and (worse) newer Android claims that apps can have only own files, not files shared with other apps. Probably some SuggestedStartLocation can work, but as I have only tablet with Android 8.1 Go Edition, I cannot check it. My desktop is 15 years old, I cannot run Android emulator on it (or any virtual machines - CPU without SLAT).