|
38 | 38 | * </ul> |
39 | 39 | * |
40 | 40 | * <p> |
41 | | - * Each of the notify methods takes an int id parameter. This id identifies |
42 | | - * this notification from your app to the system, so that id should be unique |
43 | | - * within your app. If you call one of the notify methods with an id that is |
44 | | - * currently active and a new set of notification parameters, it will be |
45 | | - * updated. For example, if you pass a new status bar icon, the old icon in |
46 | | - * the status bar will be replaced with the new one. This is also the same |
47 | | - * id you pass to the {@link #cancel} method to clear this notification. |
| 41 | + * Each of the notify methods takes an int id parameter and optionally a |
| 42 | + * {@link String} tag parameter, which may be {@code null}. These parameters |
| 43 | + * are used to form a pair (tag, id), or ({@code null}, id) if tag is |
| 44 | + * unspecified. This pair identifies this notification from your app to the |
| 45 | + * system, so that pair should be unique within your app. If you call one |
| 46 | + * of the notify methods with a (tag, id) pair that is currently active and |
| 47 | + * a new set of notification parameters, it will be updated. For example, |
| 48 | + * if you pass a new status bar icon, the old icon in the status bar will |
| 49 | + * be replaced with the new one. This is also the same tag and id you pass |
| 50 | + * to the {@link #cancel(int)} or {@link #cancel(String, int)} method to clear |
| 51 | + * this notification. |
48 | 52 | * |
49 | 53 | * <p> |
50 | 54 | * You do not instantiate this class directly; instead, retrieve it through |
@@ -93,12 +97,11 @@ public void notify(int id, Notification notification) |
93 | 97 | /** |
94 | 98 | * Persistent notification on the status bar, |
95 | 99 | * |
96 | | - * @param tag An string identifier for this notification unique within your |
97 | | - * application. |
| 100 | + * @param tag A string identifier for this notification. May be {@code null}. |
| 101 | + * @param id An identifier for this notification. The pair (tag, id) must be unique |
| 102 | + * within your application. |
98 | 103 | * @param notification A {@link Notification} object describing how to |
99 | 104 | * notify the user, other than the view you're providing. Must not be null. |
100 | | - * @return the id of the notification that is associated with the string identifier that |
101 | | - * can be used to cancel the notification |
102 | 105 | */ |
103 | 106 | public void notify(String tag, int id, Notification notification) |
104 | 107 | { |
|
0 commit comments