Intents and IntentFilters

阅读更多

One area where Android shines is the flexibility it provides in communicating between components, and

sharing data between them. 利用的就是Intent- and IntentFilter-based events.

 

Intent: is a description of an action you want to happen.

IntentFilter: is a means for a component to declare it's capable of handling a specific Intent.

 

Intents themselves don't do any work; rather, they describe something that needs to be done.

 

If a component wants to perform an action, it declares that intention with an Intent and hands it off to the

system. The system then decodes the Intent and decides which other component, Activity, Service, or

BroadcastReceiver, can handle the job.

 

Also, if an Activity, BroadcastReceiver, or Service wants to offer some action to be available to other

components, it declares an IntentFilter.

 

未完。。。。

 

 

你可能感兴趣的:(Intent,IntentFilter,Android)