Android Interview Questions and Answers What is android?


Sending An Ordered Broadcast Intent And Getting A Result



Download 0.77 Mb.
View original pdf
Page47/62
Date17.12.2020
Size0.77 Mb.
#54986
1   ...   43   44   45   46   47   48   49   50   ...   62
Android Interview Questions
8.2 Sending An Ordered Broadcast Intent And Getting A Result
An implementation of the android.content.Context method public abstract void sendOrderedBroadcast(
Intent intent,
String receiverPermission,
BroadcastReceiver resultReceiver,
Handler scheduler, int initialCode,
String initialData,
Bundle initialExtras) can be used to send an ordered broadcast Intent with associated data and obtain a result. If the receiverPermission argument is non-null then the broadcast Intent being sent cannot be received by any
BroadcastReceiver registered by an Application which has not been granted the specified permission. If the resultReceiver argument is non-null it specifies a BroadcastReceiver whose onReceive() method will be invoked when the sending of the ordered broadcast Intent completes. If the scheduler argument is non-null and the resultReceiver argument is also non-null then the onReceive() method of the BroadcastReceiver will be run in the context of the specified Handler. The



initialCode

initialData

initialExtras arguments specify the initial values of the code data extras elements respectively of the additional data associated with the sending of the ordered broadcast Intent. The method is asynchronous. It returns immediately, and the process of sending the ordered broadcast Intent executes independently of the method’s caller.

Download 0.77 Mb.

Share with your friends:
1   ...   43   44   45   46   47   48   49   50   ...   62




The database is protected by copyright ©ininet.org 2024
send message

    Main page