Android Tutorial

(avery) #1

By : Ketan Bhimani


114 

Registering Content Providers

If your application acts as a content provider, effectively exposing a
shared data service for use by other applications, it must declare
this capability within the Android manifest file using the <provider>
tag. Configuring a content provider involves determining what
subsets of data are shared and what permissions are required to
access them, if any.

Working with Permissions

The Android operating system has been locked down so that
applications have limited capability to adversely affect operations
outside their process space. Instead, Android applications run
within the bubble of their own virtual machine, with their own Linux
user account (and related permissions).

Registering Permissions Your Application Requires

Android applications have no permissions by default. Instead, any
permissions for shared resources or privileged access—whether it’s
shared data, such as the Contacts database, or access to
underlying hardware, such as the built-in camera—must be
explicitly registered within the Android manifest file. These
permissions are granted when the application is installed.

The following XML excerpt for the preceding Android manifest file
defines a ermission using the <uses-permission> tag to gain access
to the built-in camera:


A complete list of the permissions can be found in the
android.Manifest.permission class. Your application manifest should
Free download pdf