IT. Expert System.

Android Reference

ContactsContract.Authorization


android.provider

Class ContactsContract.Authorization

  • Enclosing class:
    ContactsContract


    public static final class ContactsContract.Authorization
    extends Object

    API for obtaining a pre-authorized version of a URI that normally requires special permission (beyond READ_CONTACTS) to read. The caller obtaining the pre-authorized URI must already have the necessary permissions to access the URI; otherwise a SecurityException will be thrown.

    The authorized URI returned in the bundle contains an expiring token that allows the caller to execute the query without having the special permissions that would normally be required.

    This API does not access disk, and should be safe to invoke from the UI thread.

    Example usage:

     Uri profileUri = ContactsContract.Profile.CONTENT_VCARD_URI;
     Bundle uriBundle = new Bundle();
     uriBundle.putParcelable(ContactsContract.Authorization.KEY_URI_TO_AUTHORIZE, uri);
     Bundle authResponse = getContext().getContentResolver().call(
             ContactsContract.AUTHORITY_URI,
             ContactsContract.Authorization.AUTHORIZATION_METHOD,
             null, // String arg, not used.
             uriBundle);
     if (authResponse != null) {
         Uri preauthorizedProfileUri = (Uri) authResponse.getParcelable(
                 ContactsContract.Authorization.KEY_AUTHORIZED_URI);
         // This pre-authorized URI can be queried by a caller without READ_PROFILE
         // permission.
     }
     

    • Field Detail

      • AUTHORIZATION_METHOD

        public static final String AUTHORIZATION_METHOD
        The method to invoke to create a pre-authorized URI out of the input argument.
        See Also:
        Constant Field Values
      • KEY_URI_TO_AUTHORIZE

        public static final String KEY_URI_TO_AUTHORIZE
        The key to set in the outbound Bundle with the URI that should be authorized.
        See Also:
        Constant Field Values
      • KEY_AUTHORIZED_URI

        public static final String KEY_AUTHORIZED_URI
        The key to retrieve from the returned Bundle to obtain the pre-authorized URI.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ContactsContract.Authorization

        public ContactsContract.Authorization()


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 224 / 158861497. Delta: 0.04333 с