O
O
Oleg2020-07-11 02:37:31
Android
Oleg, 2020-07-11 02:37:31

FileObserver.CLOSE_WRITE per directory & latest rules/API updates. Is it possible or not?

One of my features: Automatic printing of new files from a directory.
Didn’t raise api target above 28 until the last time

since August 12, 2020. If for the 11th android


All Files Access Permission
Files and directory attributes on a user's device are regarded as personal and sensitive user data subject to the Personal and Sensitive Information policy and the following requirements:

Apps should only request access to device storage which is critical for the app to function, and may not request access to device storage on behalf of any third-party for any purpose that is unrelated to critical user-facing app functionality.
Android devices running R (Android 11, API Level 30) or later, will require the MANAGE_EXTERNAL_STORAGE permission in order to manage access in shared storage. All apps that target R and request broad access to shared storage (“All files access”) must successfully pass an appropriate access review prior to publishing. Apps allowed to use this permission must clearly prompt users to enable “All files access” for their app under “Special app access” settings. For more information on the R requirements, please see this help article.


Theoretically, it is possible to prove the necessity.

While api 30 is not required. This is more for the future.

https://support.google.com/googleplay/android-deve...
From November 2, 2020, the 29th will become mandatory (new applications will be affected earlier)

getExternalStorageDirectory()
@deprecated To improve user privacy, direct access to shared/external
* storage devices is deprecated. When an app targets
* {@link android.os.Build.VERSION_CODES#Q}, the path returned
* from this method is no longer directly accessible to apps.
* Apps can continue to access content stored on shared/external
* storage by migrating to alternatives such as getExternalFilesDir()

Has anyone explored the issue further?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2020-07-13
@402d

<application
        android:usesCleartextTraffic="true"
        android:requestLegacyExternalStorage="true"
        tools:targetApi="q">

Tablet for 29 api requestLegacyExternalStorage.
And if you lived below the 28th before, then the webView will not open http without usesCleartextTraffic

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question