Pro Android with Kotlin


Download 5.42 Mb.
Pdf ko'rish
bet32/223
Sana04.11.2023
Hajmi5.42 Mb.
#1746807
1   ...   28   29   30   31   32   33   34   35   ...   223
Bog'liq
@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.



Download 5.42 Mb.

Do'stlaringiz bilan baham:
1   ...   28   29   30   31   32   33   34   35   ...   223




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