anv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
‘Adicionado na APInivel1 (guide/topics/manifestluses-sdk-element#ApiLevels)
Receptor
de Transmissao
Kotlin (/reference/kotlin/androidicontent/BroadcastReceiver) - Brasil | Java
public abstract class BroadcastReceiver
extends Object (/reference/java/lang/Object)
java lang.Objeto (/reference/javalang/Object)
|, android.content.BroadcastReceiver,
Subclasses diretas conhecidas
AppWidgetProvider (/reference/android/appwidgetiAppWidgetProvider), DelegatedAdminReceiver
(referencefandroid/appladmin/DelegatedAdminReceiver), DeviceAdminReceiver
(ireferencefandroid/appladmin/DeviceAdminReceiver), MomsDownloadReceiver
(ireference/android/telephonyimbms/MbmsDownloadReceiver), PolicyUpdateReceiver
(ireference/android/appladmin/PolicyUpdateReceiver), RestrictionsReceiver
(ireference/androidiservice/restrictions/RestrictionsReceiver)
‘AppWidgetProvider A-convenience class to aid in impleme
(ireference/android/appwidget/AppWidgetProvider) AppWidget provider.
DelegatedAdminReceiver Base class for delegated apps to hand
(ireference/android/appladmin/DelegatedAdminReceiver) _callbacks related to their delegated
capabilities.
DeviceAdminReceiver Base class for implementing a device
(ireference/android/appladmin/DeviceadminReceiver) administration component.
MbmsDownloadReceiver The responsible for handling intents se
(ireferencefandroid/telephonyimbms/MbmsDownloadReceiver) the middleware. BroadcastReceiver
(Wreference/android/content/Broadcas
PolicyUpdateReceiver Base class for implementing a policy u
(ireference/android/appfadmin/P olicyUpdateReceiver) receiver.
RestrictionsReceiver Abstract implementation of a Restrictic
(reference/androidfservice/restrictions/RestrictionsReceiver) Provider BroadcastReceiver.
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver watanv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
Classe base para cédigo que recebe e manipula intengdes de difusdo enviadas pelo.
Context. sendBroadcast (Intent)
(referencefandroidicontentContext#sendBroadcast(android.content.Intent))
Vocé pode registrar dinamicamente uma instancia dessa classe com ou declarar
estaticamente uma implementagao com a tag em seu . Context .registerReceiver()
(/reference/androidicontent/Context#registerReceiver(android.content.BroadcastReceiver, %20android.c
ontent.IntentFilter))
(/reference/android/R.styleable# AndroidManifestReceiver) AndroidManifest .xm1
Guias do desenvolvedor
Para obter mais informacées sobre como usar o BroadcastReceiver, leia o Guia do desenvolvedor do
Broadcasts (/guide/components/broadcasts).
Resumo
Classes aninhadas
class BroadcastReceiver .PendingResult
(ireferencefandroidicontent/BroadcastReceiver.PendingResult)
Estado para um resultado que est pendente para um receptor de
Construtores piblicos
Br Receiver (/reference/android/content/BroadcastReceiver#BroadcastReceiver()) ()
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver 21anv2i24, 1:92 PM
Receptor de Transmisslo |DesenvoWvedoras Android
Métodos piblicos
final
final
final
final
final
final
final
void
void
boolean
boolean
int
‘String (/reference/java/lang/String)
Bundle (/reference/android/os/Bundle)
‘String (/reference/ava/lang/String)
int
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver
abortBroadcast (/reference/androidicont
Define o sinalizador indicando que esse re
através do . Context. sendOrderedBroac
(ireference/androidicontentiContext#sen
clearAbortBroadcast (/reference/andro
Limpa o sinalizador indicando que esse re
getAbortBroadeast (/reference/androidk
Retorna o sinalizador que indica se esse r
getDebugUnregister (/reference/androic
Retorne 0 uitimo valor dado a . setDebugl
(/referencefandroidicontent/BroadcastRec
getResultCode (/reference/androidiconte
Recupere o cédigo de resultado atual, cor
getResultData (/reference/androidiconte
Recupere os dados de resultado atuais, cx
getResultExtras (/reference/androidicor
Recupere os dados extras do resultado at
getSentF romPackage (/reference/androic
Retorna 0 nome do pacote do aplicativo q
getSentF roid (/reference/androidicont
Returns the uid of the app that initially ser
321anv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
final BroadcastReceiver.PendingResult
goAsyne (/reference/androidicontent/Broa
(referencefandroidicontent/BroadcastReceiver. PendingResult)
final boolean
final boolean
abstract void
Binder (/reference/android/os/IBinder)
final void
final void
final void
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver
This can be called by an application in to <
onReceive(Context, Intent),
(reference/androidicontent/BroadcastRe«
isInitialStickyBroadcast (reference.
Returns true if the receiver is currently pre
broadcast and is currently held in the sticl
isOrderedBroadcast (/reference/androic
Returns true if the receiver is currently pre
onReceive
(Wreference/androidicontent/BroadcastRe«
(/reference/androidicontent/Context) cor
This method is called when the Broadcast
peekService
(/reference/androidicontent/BroadcastRe«
(Context (/reference/androidicontent/Cot
Provide a binder to an already-bound serv
setDebugUnregister (/reference/androic
Control inclusion of debugging help for mi:
(ireferencefandroidicontent/Context#tregi
setOrderedHint (/reference/android/cont
For internal use, sets the hint about whet
setResult (/reference/androidcontent/Br
code, String (/reference/java/lang/Strin,
ananv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
Change all of the result data returned fror
Context sendOrderedBroadcast
(reference/androidicontent/Contexti#sen.
final void setResultCode (/reference/androidiconte
Change the current result code of this bre
Context. sendOrderedBroadcast
(/reference/androidicontent/Context#sen
final void setResultData (/reference/androidiconte
(ireferencejava/lang/String) data)
Change the current result data of this bro
Context. sendOrderedBroadcast
(reference/androidicontent/Context#sen
final void setResultExtras (/reference/androidicot
(Wreference/androidios/Bundle) extras)
Change the current result extras of this br
Context. sendOrderedBroadcast
(/reference/androidicontent/Context#sen
Inherited methods
From class java. lang. Object (/reference/java/lang/Object)
Object (/reference/javallang/Object) elone (/reference/java/lang/Object#clone())()
Creates and retums a copy of this object.
boolean equal:
(reference/java/lang/Object#equals java.lang.Object)
(Object (ireference/javallang/Object) obj)
Indicates whether some other object is “equal to” this
one.
void finalize (reference/avallang/Object#finalize0)()
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver 521anv2i24, 1:92 PM
Final. Class (/reference/avarlang/Class)>
int
final void
final void
‘String (/reference/java/lang/string)
final void
final void
final void
Receptor de Transmisslo |DesenvoWvedoras Android
Called by the garbage collector on an object when
garbage collection determines that there are no more
references to the object.
‘getClass (/reference/ava/lang/Objecti#getClass())()
Returns the runtime class of this . Object
hashCode (/reference/java/lang/Object#hashCode()) ()
Returns a hash code value for the object.
notify (/reference/javaltang/Object#notify())()
Wakes up a single thread that is waiting on this object's
monitor.
notifyAl] (/reference/javalang/Object#tnotifyAll0)()
Wakes up all threads that are waiting on this object's
monitor.
toString (/reference/avallang/Object#toString()()
Retums a string representation of the object.
wait (/reference/java/lang/Object#wait(long,%20int))
(long timeoutMillis, int nanos)
Causes the current thread to wait unti it is awakened,
typically by being notified or interrupted, or until a certain
amount of real time has elapsed.
wait (/reference/javallang/Object#wait(long)) (long
‘timeoutMillis)
Causes the current thread to wait until it is awakened,
typically by being notified or interrupted, or until a certain
‘amount of real time has elapsed.
wait (/reference/java/lang/Object#wait())()
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver 621anv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
Causes the current thread to wait unti it is awakened,
typically by being notified or interrupted.
Public constructors
BroadcastReceiver ‘Added in API level 1 (/guide/topics/manifest/uses-sdk-element#ApiLevels)
public BroadcastReceiver ()
Public methods
abortBroadcast ‘Added in API level 1 (/uide/topics/manifest/uses-sdk-element#ApiLevels)
public final void abortBroadcast ()
Sets the flag indicating that this receiver should abort the current broadcast; only works
with broadcasts sent through . This will prevent any other broadcast receivers from
receiving the broadcast. It wil still call of the BroadcastReceiver that the caller of passed
in. Context .sendOrderedBroadcast
(reference/androidicontent/Context#sendOrderedBroadcast(android.content. Intent, %20java.lang.Strin
9)
onReceive(Context, Intent)
(referencefandroidicontent/BroadcastReceivers#onReceive(android. content. Context, %20android.conten
tintent))
Context. sendOrderedBroadcast
(reference/androidicontent/Context#sendOrdered8roadcast(android.content.intent, %20java.lang.Strin
g)
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver reanv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
This method does not work with non-ordered broadcasts such as those sent with
Context. sendBroadcast (/reference/androidicontent/Context#sendBroadcast(android.content.intent))
clearAbortBroadcast Added in API level 1 (/quide/topics/manifest/uses-sdk-element#ApiLevels)
public final void clearAbortBroadcast ()
Clears the flag indicating that this receiver should abort the current broadcast.
getAbortBroadcast Added in API level1 (/quide/topics/manifestiuses-sdk-element#ApiLevels)
public final boolean getAbortBroadcast ()
Returns the flag indicating whether or not this receiver should abort the current broadcast.
Returns
boolean True if the broadcast should be aborted,
getDebugUnregister Added in aPlevel 1 (/quide/topicsimanifestlses-sdk-element#ApiLevels)
public final boolean getDebugUnregister ()
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver anianv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
Return the last value given to .setDebugUnregister(boolean)
(Wreference/androidicontent/BroadcastReceivertsetDebugUnregister(boolean))
Returns
boolean
getResultCode ‘Added in API level 1 (/guide/topics/manifest/uses-sdk-element#ApiLevels)
public final int getResultCode ()
Retrieve the current result code, as set by the previous receiver.
Returns
int int The current result code.
getResultData ‘Added in APLlevel 1 (iquide/topicsimanifest/uses-sdk-element#ApiLevels)
public final String (/reference/javalang/String) getResultData ()
Retrieve the current result data, as set by the previous receiver. Often this is null
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver 91anv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
Returns
string String The current result data; may be null.
(/reference/java/lang/String)
getResultExtras Added in APLlevel 1 (iquide/topics/manifest/uses-sdk-element#ApiLevels)
public final Bundle (/reference/androidios/Bundle) getResultExtras (boolean makeMap)
Retrieve the current result extra data, as set by the previous receiver. Any changes you
make to the returned Map will be propagated to the next receiver.
Parameters
makeMap boolean: If true then a new empty Map will be made for you if the
current Map is null if false you should be prepared to receive a null
Map.
Returns
Bundle Map The current extras map.
(referencefandroidios/Bundle)
getSentFromPackage Added in API level 34 ({quide/topics/manifest/Juses-sdk-element#ApiLevels)
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver 021anv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
public String (reference/javallangiString) getSentFromPackage ()
Returns the package name of the app that initially sent this broadcast.
Returns
string the package name of the broadcasting app or if the current receiver
(Ireference/java/lang/String) cannot access the identity of the broadcasting appnul1
getSentFromUid ‘Added in API level 34 (/guide/topics/manifestluses-sdk-element#ApiLevels)
public int getSentFromUid ()
Returns the uid of the app that initially sent this broadcast.
Returns
int the uid of the broadcasting app or if the current receiver cannot
access the identity of the broadcasting appProcess#INVALID_UID
(Wreferencefandroidios/Process#INVALID_UID)
goAsync Added in APLlevel 1t (iquide/topicsmanifestiuses-sdk-element#ApiLevels)
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver waranv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
public final BroadcastReceive ngResult (/reference/androidicontent/BroadcastReceiver. Pt
This can be called by an application in to allow it to keep the broadcast active after
returning from that function. This does not change the expectation of being relatively
responsive to the broadcast, but does allow the implementation to move work related to it
over to another thread to avoid glitching the main UI thread due to disk IO.
onReceive(Context, Intent)
(/reference/androidicontent/BroadcastReceiver#onReceive(android.content.Context,%20android.conten
tuintent))
As a general rule, broadcast receivers are allowed to run for up to 10 seconds before the
system will consider them non-responsive and ANR the app. Since these usually execute on
the app's main thread, they are already bound by the ~5 second time limit of various
operations that can happen there (not to mention just avoiding Ul jank), so the receive limit
is generally not of concern. However, once you use , though able to be off the main thread,
the broadcast execution limit still applies, and that includes the time spent between calling
this method and ultimately .goAsyncPendingResult. finish()
(/reference/androidicontent/BroadcastReceiver.PendingResult#finish())
If you are taking advantage of this method to have more time to execute, it is useful to know
that the available time can be longer in certain situations. In particular, if the broadcast you
are receiving is not a foreground broadcast (that is, the sender has not used ), then more
time is allowed for the receivers to run, allowing them to execute for 30 seconds or even a
bit more. This is something that receivers should rarely take advantage of (long work should
be punted to another system facility such as , , or see especially ), but can be useful in
certain rare cases where it is necessary to do some work as soon as the broadcast is
delivered. Keep in mind that the work you do here will block further broadcasts until it
completes, so taking advantage of this at all excessively can be counter-productive and
cause later events to be received more slowly. Intent#FLAG_RECEIVER FOREGROUND
(referencefandroidicontent/intent#FLAG_RECEIVER_FOREGROUND) JobScheduler
(/reference/android/app/jobUobScheduler) Service (/reference/android/app/Service) JobIntentService
(https://developer.android.com/reference/androidx/core/appUobIntentService.html)
Returns
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver yoanv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
BroadcastReceiver . PendingResult Returns a representing the result of the ac
(Wreferencefandroidicontent/BroadcastReceiver PendingResult) BroadcastRecord itself is no longer active;
interaction must go through APIs. The me!
processing of the broadcast is done.Pend:
(/referencefandroidicontent/BroadcastRe«
PendingResult
(/reference/androidicontent/BroadcastRe«
PendingResult. finish()
(/referencefandroidicontent/BroadcastRec
isInitialStickyBroadcastadded in 4P|level 5 (/quide/topicsimanifest/uses-sdk-element#ApiLevels)
public final boolean isInitialstickyBroadcast ()
Returns true if the receiver is currently processing the initial value of a sticky broadcast -~
that is, the value that was last broadcast and is currently held in the sticky cache, so this is
not directly the result of a broadcast right now.
Returns
boolean
isOrderedBroadcast Added in aPilevel § (/guide/topics/manifestluses-sdk-element#ApiLevels)
public final boolean isOrderedBroadcast ()
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver 921anv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
Returns true if the receiver is currently processing an ordered broadcast.
Returns
boolean
onReceive ‘Added in APLlevel 1 (/quide/topies/manifestlises-sdk-element#ApiLevels)
public abstract void onReceive (Context (/reference/android/content/Context) context,
Intent (/reference/androidicontent/intent) intent)
This method is called when the BroadcastReceiver is receiving an Intent broadcast. During
this time you can use the other methods on BroadcastReceiver to view/modify the current
result values. This method is always called within the main thread of its process, unless you
explicitly asked for it to be scheduled on a different thread using . When it runs on the main
thread you should never perform long-running operations in it (there is a timeout of 10
seconds that the system allows before considering the receiver to be blocked and a
candidate to be killed). You cannot launch a popup dialog in your implementation of
onReceive(). Context. registerReceiver(BroadcastReceiver, IntentFilter, String,
android.os.Handler)
(referencefandroidicontent/Context#registerReceiver(android.content. BroadcastReceiver, %20android.c
ontent..IntentFilter,%20java. lang,String, %20android.os.Handler))
If this BroadcastReceiver was launched through a tag, then the object is no
longer alive after returning from this function. This means you should not perform any
operations that return a result to you asynchronously. If you need to perform any follow up
background work, schedule a with . If you wish to interact with a service that is already
running and previously bound using, you can use . JobService
(reference/androidapp/jobUobService) JobScheduler (/reference/android/app/jobobScheduler)
bindService(),
Ureference/android/content/Context#tbindService(android.content.Intent, %20android.content. ServiceCo
nnection, %20int))
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver sazanv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
peekService(Context, Intent)
(referencefandroidicontent/BroadcastReceivers#peekService(android.content.Context, %20android.cont
ent.Intent))
The Intent filters used in and in application manifests are not guaranteed to be exclusive.
They are hints to the operating system about how to find suitable recipients. It is possible
for senders to force delivery to specific recipients, bypassing filter resolution. For this
reason, implementations should respond only to known actions, ignoring any unexpected
Intents that they may receive. Context. registerReceiver (BroadcastReceiver,
IntentFilter)
(ireferencefandroidicontent/Context#registerReceiver(android.content.BroadcastReceiver,%20android.c
ontent.intentFilter))
onReceive()
(referenceandroidicontent/BroadcastReceiver#onReceive(android.content. Context, %20android.conten
tintent))
Parameters
context Context: The Context in which the receiver is running.
intent Intent: The Intent being received.
peekService ‘Added in APL level 3 (Iguide/topics/manifestiuses-sdk-element#ApiLevels)
public IBinder (/reference/androidios/Binder) peekService (Context (/reference/androidicontent/C
Intent (/reference/android/content/intent) service)
Provide a binder to an already-bound service. This method is synchronous and will not start
the target service if it is not present, so it is safe to call from . For peekService() to return a
non null interface the service must have published it before. In other words some
component must have called on it.onReceive(Context,_Intent)
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver 921anv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
(referencefandroidicontent/BroadcastReceiver#onReceive (android. content. Context, %20android.conten
tintent))
IBinder (/reference/android/os/IBinder) Context .bindService(Intent,_ServiceConnection,_int)
(Ireferencefandroidicontent/Context#bindService(android.content. Intent, %20android. content. ServiceCo
nection, %20int))
Parameters
myContext. Context: The Context that had been passed to onReceive(android
(ireferencefandroidicontent/BroadcastReceiverttonReceive(android.cor
service Intent: Identifies the already-bound service you wish to use. See for m
ServiceConnection, int)
(Wreferencefandroidicontent/Context#bindService(android.content. inter
Returns
IBinder
(referencefandroidiosABinder)
setDebugUnregister Added in APllevel 1 (/quide/topics/manifest/uses-sdk-element#tApil evels)
public final void setDebugUnregister (boolean debug)
Control inclusion of debugging help for mismatched calls to . if called with true, before
given to registerReceiver(), then the callstack of the following call is retained, to be printed
if a later incorrect unregister call is made. Note that doing this requires retaining
information about the BroadcastReceiver for the lifetime of the app, resulting in a leak --
this should only be used for debugging. Context. registerReceiver()
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver 621anv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
(referencefandroidicontent/Context#registerReceiver(android.content. BroadcastReceiver, %20android.c
ontent.intentFilter))
Context .unregisterReceiver()
(reference/androidicontent/Context#unregisterReceiver(android.content.BroadcastReceiver))
Parameters
debug boolean
setOrderedHint Added in API level 1 (/guide/topics/manifest/uses-sdk-element##ApiLevels)
public final void setOrderedHint (boolean isOrdered)
For internal use, sets the hint about whether this BroadcastReceiver is running in ordered
mode.
Parameters
isOrdered boolean
setResult Added in API level 1 (/quide/topics/manifest/uses-sdk-element#ApiLevels)
public final void setResult (int code,
‘String (/reference/java/lang/String) data,
Bundle (/reference/android/os/Bundle) extras)
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver sieanv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
Change all of the result data returned from this broadcasts; only works with broadcasts
sent through . All current result data is replaced by the value given to this method.
Context. sendOrderedBroadcast
(ireference/androidicontent/Context#sendOrderedBroadcast(android.content.intent,%20java.lang.Strin
9)
This method does not work with non-ordered broadcasts such as those sent with
Context. sendBroadcast (/reference/android/content/Context#sendBroadcast(android.content.Intent))
Parameters
code int: The new result code. Often uses the Activity and constants,
though the actual meaning of this value is ultimately up to the
broadcaster. Activity. RESULT CANCELED
(ireference/android/app/Activity#RESULT_CANCELED)
Activity. RESULT OK (/reference/android/app/Activity#RESULT_OK)
data ‘String: The new result data. This is an arbitrary string whose
interpretation is up to the broadcaster; may be null.
extras Bundle: The new extra data map. This is a Bundle holding arbitrary
data, whose interpretation is up to the broadcaster. Can be set to null.
This completely replaces the current map (if any).
setResultCode ‘Added in API level 1 (/quide/topics/manifest/luses-sdk-element#ApiLevels)
public final void setResultCode (int code)
Change the current result code of this broadcast; only works with broadcasts sent through
Often uses the Activity and constants, though the actual meaning of this value is ultimately
up to the broadcaster. Context. sendOrderedBroadcast
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver 621anv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
(reference /androidicontent/Context#sendOrderedBroadcast(android.content.Intent,%20java.lang.Strin
g)
i ESULT_CANCELED (/reference/android/appiActivity#RESULT_CANCELED)
Activity.RESULT_OK (/reference/android/appiActivity#RESULT_OK)
This method does not work with non-ordered broadcasts such as those sent with
Context. sendBroadeast (/reference/androidicontent/Context#sendBroadcast(android.content.intent))
Parameters
code int: The new result code.
See also:
setResult(int, String, Bundle)
(Wreference/androidicontent/BroadcastReceiveritsetResult(int,%20java lang String, %20android.os. Bundle
»
setResultData ‘Added in API level 1 (iquide/topics/manifest/uses-sdk-element#ApiLevels)
public final void setResultData (String (/reference/javalang/String) data)
Change the current result data of this broadcast; only works with broadcasts sent through
This is an arbitrary string whose interpretation is up to the broadcaster.
rn ndOrderedBr
(/reference/androidicontent/Context#sendOrderedBroadcast(android.content.Intent,%20java.lang.Strin
9)
This method does not work with non-ordered broadcasts such as those sent with
Context. sendBroadcast (/reference/android/content/Context#sendBroadcast(android.content.Intent))
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver s921anv2i24, 1:92 PM Receptor de Transmisslo |DesenvoWvedoras Android
Parameters
data String: The new result data; may be null
See also:
setResult(int, String, Bundle)
(ireferencefandroidicontent/BroadcastReceiver#tsetResult(int, %20java.lang String, %20android.os. Bundle
»
setResultExtras ‘Added in API level 1 (/quide/topics/manifest/uses-sdk-element#tApiLevels)
public final void setResultExtras (Bundle (/reference/androidios/Bundle) extras)
Change the current result extras of this broadcast; only works with broadcasts sent through
This is a Bundle holding arbitrary data, whose interpretation is up to the broadcaster. Can
be set to null. Calling this method completely replaces the current map (if any).
Context. sendOrderedBroadcast
(Wreferencefandroidicontent/Context#sendOrderedBroadcast(android.content.intent,%20java.lang.Strin
9)
This method does not work with non-ordered broadcasts such as those sent with
Context. sendBroadcast (/reference/androidicontent/Context#sendBroadcast(android.content.Intent))
Parameters
extras Bundle: The new extra data map; may be null.
See also:
hitpssldeveloper android comireforonce/androld/contonUBroadcastRecolver 20121anvaiza, 1:32 PM Receptor de Transmissdo |DesenvoWedores Android
setResult(int, String, Bundle)
(Wreference/android/content/BroadcastReceivert#setResult(int,%20java lang, String %20android.os. Bundle
»
Content anc code samplescn this page are subject to the licenses described in the Content License (ficense).
Java and OpenJDK are trademarks or registered tracemarks cf Oracle andi its affiliates.
t updated 2024-04-04 UTC.
ntps:idevelopor androkt. comet erencelandroicontentBroadcastRecoWve’ aves