pub struct UsesPermissionSdk23 {
    pub name: Option<String>,
    pub max_sdk_version: Option<u32>,
}
Expand description

Specifies that an app wants a particular permission.

But only if the app is installed on a device running Android 6.0 (API level 23) or higher. If the device is running API level 22 or lower, the app does not have the specified permission.

This element is useful when you update an app to include a new feature that requires an additional permission. If a user updates an app on a device that is running API level 22 or lower, the system prompts the user at install time to grant all new permissions that are declared in that update. If a new feature is minor enough, you may prefer to disable the feature altogether on those devices, so the user does not have to grant additional permissions to update the app. By using the <uses-permission-sdk-23> element instead of <uses-permission>, you can request the permission only if the app is running on platforms that support the runtime permissions model in which the user grants permissions to the app while it is running. For more information on permissions, see the Permissions section in the introduction and the separate System Permissions API guide. A list of permissions defined by the base platform is available at android.Manifest.permission.

XML Syntax

 <uses-permission-sdk-23 android:name="string"
                         android:maxSdkVersion="integer" />

Contained in

<manifest>

introduced in:

API Level 23

Fields§

§name: Option<String>

The name of the permission. This permission can be defined by the app with the <permission> element, it can be a permission defined by another app, or it can be one of the standard system permissions, such as android.permission.CAMERA or android.permission.READ_CONTACTS.

§max_sdk_version: Option<u32>

The highest API level at which this permission should be granted to your app. If the app is installed on a device with a later API level, the app is not granted the permission and cannot use any related functionality.

Trait Implementations§

source§

impl Clone for UsesPermissionSdk23

source§

fn clone(&self) -> UsesPermissionSdk23

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for UsesPermissionSdk23

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for UsesPermissionSdk23

source§

fn default() -> UsesPermissionSdk23

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for UsesPermissionSdk23

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<UsesPermissionSdk23> for UsesPermissionSdk23

source§

fn eq(&self, other: &UsesPermissionSdk23) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for UsesPermissionSdk23

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl YaDeserialize for UsesPermissionSdk23

source§

fn deserialize<R: Read>(reader: &mut Deserializer<R>) -> Result<Self, String>

source§

impl YaSerialize for UsesPermissionSdk23

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, source_attributes: Vec<OwnedAttribute>, source_namespace: Namespace ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl Eq for UsesPermissionSdk23

source§

impl StructuralEq for UsesPermissionSdk23

source§

impl StructuralPartialEq for UsesPermissionSdk23

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,