Skip to content

Commit 9209819

Browse files
committed
Add documentation about @Receiver.Extra
1 parent 63e1cb0 commit 9209819

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/Receiver.java‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@
2929
* method.
3030
* </p>
3131
* <p>
32-
* The annotated method MUST return void and MAY have one parameter:
32+
* The annotated method MUST return void and MAY have several parameters:
3333
* </p>
3434
* <ul>
3535
* <li>An {@link android.content.Intent}</li>
36+
* <li>Any native, {@link android.os.Parcelable} or {@link java.io.Serializable}
37+
* parameters annotated with {@link Receiver.Extra} which will be the extra put
38+
* in the intent. The key of this extra is the value of the annotation
39+
* {@link Receiver.Extra} if set or the name of the parameter.</li>
3640
* </ul>
3741
* <p>
3842
* The annotation has four parameters:
@@ -70,6 +74,9 @@
7074
* &#064;Receiver(actions = {@link android.net.wifi.WifiManager#WIFI_STATE_CHANGED_ACTION}, registerAt = RegisterAt.OnResumeOnPause)
7175
* public void onWifiStateChangedWithoutIntent();
7276
*
77+
* &#064;Receiver(actions = {@link android.net.wifi.WifiManager#WIFI_STATE_CHANGED_ACTION})
78+
* public void onWifiStateChangedWithInjectedExtra(@Receiver.Extra({@link android.net.wifi.WifiManager#EXTRA_WIFI_STATE}) int wifiState);
79+
*
7380
* &#064;Receiver(actions = {@link android.content.Intent#ACTION_VIEW}, dataSchemes = "http")
7481
* public void onHttpUrlOpened(Intent intent);
7582
*

0 commit comments

Comments
 (0)