Android Interview Questions and Answers What is android?


Stage Four ResultReceiver onReceive() Method Called



Download 0.77 Mb.
View original pdf
Page55/62
Date17.12.2020
Size0.77 Mb.
#54986
1   ...   51   52   53   54   55   56   57   58   ...   62
Android Interview Questions
8.3.2.4 Stage Four ResultReceiver onReceive() Method Called

The ResultReceiver.onReceive() method prints
ResultReceiver
Intent { act=xper.example.ORDERED_BROADCAST_INTENT_TWO } getResultCode() => 320 getResultData() => ExampleTwo, Three, TwoA
Begin Extras
Three.value
=> Three
TwoA.value
=> TwoA
End Extras
ResultReceiver done
8.3.3 Example Three
Sending an ordered broadcast Intent which is not handled by any of the registered BroadcastReecivers.
8.3.3.1 Stage One Sending The Intent
The Intent is sent as follows sendOrderedBroadcast( new Intent
"xper.example.ORDERED_BROADCAST_INTENT_FOUR"), null, new ResultReceiver(), null,
-3,
"ExampleThree", null
8.3.3.2 Stage Two ResultReceiver onReceive() Method Called
The ResultReceiver.onReceive() method prints
ResultReceiver
Intent { act=xper.example.ORDERED_BROADCAST_INTENT_FOUR } getResultCode() => -3 getResultData() => ExampleThree
Begin Extras
End Extras
ResultReceiver done

Download 0.77 Mb.

Share with your friends:
1   ...   51   52   53   54   55   56   57   58   ...   62




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

    Main page