Pro Android with Kotlin


Download 5.42 Mb.
Pdf ko'rish
bet40/223
Sana04.11.2023
Hajmi5.42 Mb.
#1746807
1   ...   36   37   38   39   40   41   42   43   ...   223
Bog'liq
@de android telegram Pro Android with Kotlin Developing Modern Mobile

30
CHAPTER 4: Services
Table 4-1. Manifest Flags for Services
Name
Description
android:description
This is a resource ID pointing to a description of the service. You should 
use it because users can kill services, but if you tell them what your 
service does, this is less likely to happen.
android:directBootAware
This can be true or false. The default is false. If true, the service can 
run even if the device is not yet unlocked after a restart. The Direct 
Boot mode was introduced in Android 7.0 (API level 24). Note that a 
Direct Boot–aware service must store its data in the device’s protected 
storage.
android:enabled
This can be true or false. The default is true. If false, the service 
is effectively disabled. You wouldn’t normally set it to false for a 
production service.
android:exported
This can be true or false. This specifies whether other applications can 
use the service. The default is false if there are no intent filters and true 
otherwise. The presence of intent filters implies external usage, thus this 
distinction.
android:icon
This is the icon resource ID. The default is the app’s icon.
android:isolatedProcess
This can be true or false. The default is false. If true, the service has 
no means to communicate with the system, only through the service 
methods. It is actually a good idea to use this flag, but in most cases 
your service will need to talk to the system, so you have to leave it false 
unless the service is really self-contained.
android:label
This is a label for the service displayed to the user. The default is the 
app’s label.
android:name
This is the name of the service’s class. If you use a dot as the first 
character, it automatically gets prepended with the name of the package 
specified in the manifest element.
android:permission
This is the permission name adjoint to this service. The default is the 
permission attribute in the application element. If not specified and a 
default does not apply, the service will not be protected.
android:service
This is the name of the service’s process. If specified, the service will run 
in its own process. If it starts with a colon (:), the process will be private 
to the app. If it starts with a lowercase letter, the process spawned will 
be a global process. Security restrictions might apply.
The  element allows for the following child elements:


This can be zero, one, or many intent filters. They are described in
Chapter 
3
.



Download 5.42 Mb.

Do'stlaringiz bilan baham:
1   ...   36   37   38   39   40   41   42   43   ...   223




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