Pro Android with Kotlin



Yüklə 4,6 Kb.
Pdf görüntüsü
səhifə32/231
tarix29.11.2023
ölçüsü4,6 Kb.
#138831
1   ...   28   29   30   31   32   33   34   35   ...   231
@de android telegram Pro Android with Kotlin Developing Modern Mobile

19
CHAPTER 3: Activities
Caution
The 
priority
attribute should be used with caution. A component cannot possibly 
know what priorities other components from other apps can have. So, you introduce some kind of 
dependency between apps, which is not intended by design.
This 

element can be a child of the following:
 

and 

 

 

So, intents can be used to launch activities and services and to fire broadcast messages.
The element must contain children elements as follows:
 

(obligatory)
 

(optional)
 

(optional)
Intent Action
The 

child of the filter (or children, because you can have more than one) specifies 
the action to perform. The syntax is as follows:

This will be something expressing an action such as View, Pick, Edit, Dial, and so on. The 
complete list of generic actions is specified by constants with names like 
ACTION_*
inside the 
class 
android.content.Intent
; you can find a list in the section “Intent Constituent Parts” in 
the online text companion. Besides those generic actions, you can define your own actions.
Note
Using any of the standard actions does not necessarily mean there is any app on your 
device that is able to respond to a corresponding intent.
Intent Category
The 

child of the filter specifies a category for the filter. The syntax is as follows:

This attribute may be used to specify the type of component that an intent should address. 
You can specify several categories, but the category is not used for all intents, and you can 
omit it as well. The filter will match the intent only if 
all
required categories are present.



Yüklə 4,6 Kb.

Dostları ilə paylaş:
1   ...   28   29   30   31   32   33   34   35   ...   231




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə