StrictMode.VmPolicy.Builder.DetectImplicitUriPermissionGrant Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Detects when URI permissions are implicitly granted to your app, a behavior that will be discontinued in Android 18 (API 38).
[Android.Runtime.Register("detectImplicitUriPermissionGrant", "()Landroid/os/StrictMode$VmPolicy$Builder;", "", ApiSince=37)]
public Android.OS.StrictMode.VmPolicy.Builder DetectImplicitUriPermissionGrant();
[<Android.Runtime.Register("detectImplicitUriPermissionGrant", "()Landroid/os/StrictMode$VmPolicy$Builder;", "", ApiSince=37)>]
member this.DetectImplicitUriPermissionGrant : unit -> Android.OS.StrictMode.VmPolicy.Builder
Returns
- Attributes
Remarks
Detects when URI permissions are implicitly granted to your app, a behavior that will be discontinued in Android 18 (API 38).
Implicit URI permission grants can occur when an app receives an Intent containing a Uri but without the Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION flags, yet the system still grants access to the URI on behalf of the app.
Since implicit URI grants are being discontinued, developers must address this to prevent future app breakage. When sending intents with Uris, ensure that the appropriate grant flags are explicitly set if permission is intended to be granted. If no permission grant is intended, do not include Uris that could trigger implicit grants.
Android reference for android.os.StrictMode.VmPolicy.Builder.detectImplicitUriPermissionGrant.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.