Changes

Kotlin Android Broadcast Intents and Broadcast Receivers

481 bytes added, 20:01, 30 November 2017
no edit summary
<table border="0" cellspacing="0" width="100%"><tr>
<td width="20%">[[Android Implicit Intents – A Kotlin Example|Previous]]<td align="center">[[Kotlin / Android Studio Development Essentials|Table of Contents]]<td width="20%" align="right">[[Kotlin Threads and AsyncTasks]|Next]]</td>
<tr>
<td width="20%">Android Implicit Intents – A Kotlin Example<td align="center"><td width="20%" align="right">Kotlin Threads and AsyncTasks</td>
</table>
<hr>
 
 
<htmlet>as30kotlin</htmlet>
 
 
In addition to providing a mechanism for launching application activities, intents are also used as a way to broadcast system wide messages to other components on the system. This involves the implementation of Broadcast Intents and Broadcast Receivers, both of which are the topic of this chapter.
== An An Overview of Broadcast Intents ==
Broadcast intents are Intent objects that are broadcast via a call to the sendBroadcast(), sendStickyBroadcast() or sendOrderedBroadcast() methods of the Activity class (the latter being used when results are required from the broadcast). In addition to providing a messaging and event system between application components, broadcast intents are also used by the Android system to notify interested applications about key system events (such as the external power supply or headphones being connected or disconnected).