Pro Android with Kotlin


CHAPTER 6: Content Providers


Download 5.42 Mb.
Pdf ko'rish
bet65/223
Sana04.11.2023
Hajmi5.42 Mb.
#1746807
1   ...   61   62   63   64   65   66   67   68   ...   223
Bog'liq
@de android telegram Pro Android with Kotlin Developing Modern Mobile

68
CHAPTER 6: Content Providers
Table 6-1. (continued )
Attribute (Prepend android: 
to Each)
Description
grantUriPermissions
This specifies whether permission to other apps accessing content 
from this provider by URI can be temporarily granted. Temporarily 
granted means a permission denial as defined by 

, or writePermission gets overridden temporarily if 
the content accessing client was invoked by an intent with intent.
addFlags(Intent.FLAG_GRANT_*_URI_PERMISSION). If you set this 
attribute to false, a more fine-grained temporary permission can 
still be granted by setting one or more  
subelements. The default is false.
icon
This specifies the resource ID of an icon to use for the provider. The 
default is to use the parent component’s icon.
initOrder
Here you can impose some order for content providers of the same 
app to be instantiated. Higher numbers get instantiated first. Use this 
with care, since startup order dependencies might indicate a bad 
application design.
label
This specifies a string resource ID for a label to use. The default is the 
app’s label.
multiprocess
If set to true, an app running in more than one processes possibly 
will have multiple instances of the content provider running. 
Otherwise, at most one instance of the content provider will exist. The 
default is false.
name
This specifies the fully qualified class name of the ContentProvider 
implementation.
permission
This is a convenient way of setting both readPermission and 
writePermission. Specifying one of the latter has precedence.
process
Specify a process name if you want the content provider to run in 
another process than the app itself. If it starts with a colon (:), the 
process will be private to the app; if it starts with a lowercase letter, 
a global process will be used (permission to do so required). The 
default is to run in the app’s process.
readPermission
This is a permission a client must have to read content of the content 
provider. You can have a client without that permission still access 
the content by virtue of the grantUriPermissions attribute.
syncable
This specifies whether data of the content provider should be 
synchronized with a server.
readPermission
This is a permission a client must have to write to content of the 
content provider. You can have a client without that permission still 
access the content by virtue of the grantUriPermissions attribute.



Download 5.42 Mb.

Do'stlaringiz bilan baham:
1   ...   61   62   63   64   65   66   67   68   ...   223




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling