You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-7
Original file line number
Diff line number
Diff line change
@@ -106,9 +106,9 @@ public class AppGcmReceiverUIBackground implements GcmReceiverUIBackground {
106
106
```
107
107
108
108
#### GcmReceiverUIForeground
109
-
`GcmReceiverUIForeground` implementation will be called when a notification is received and the application is in the foreground. The implementation class must be an `Activity` or an `android.support.v4.app.Fragment`. `GcmReceiverUIForeground` exposes the `target()` method, which forces to the implementation class to return a string.
109
+
`GcmReceiverUIForeground` implementation will be called when a notification is received and the application is in the foreground. The implementation class must be an `Activity` or an `android.support.v4.app.Fragment`. `GcmReceiverUIForeground` exposes a method called `target()`, which forces to the implementation class to return a string.
110
110
111
-
RxGcm internally compares this string to the value of the rx_gcm_key_target node payload notification. If the current `Activity` or visible `Fragment``target()` value matches with the one of rx_gcm_key_target node, the `isTarget()` method of the [ForegroundMessage](https://github.com/VictorAlbertos/RxGcm/blob/master/rx_gcm/src/main/java/rx_gcm/ForegroundMessage.java) class will return true, otherwise it will return false.
111
+
RxGcm internally compares this string to the value of the rx_gcm_key_target node payload notification. If the current `Activity` or visible `Fragment``target()`method value matches with the one of rx_gcm_key_target node, the `isTarget()` method of the [ForegroundMessage](https://github.com/VictorAlbertos/RxGcm/blob/master/rx_gcm/src/main/java/rx_gcm/ForegroundMessage.java) class will return true, otherwise it will return false.
@@ -144,10 +144,10 @@ public class FragmentSupply extends android.support.v4.app.Fragment implements G
144
144
}
145
145
```
146
146
147
-
**Limitation:**: Your fragments need to extend from android.support.v4.app.Fragment` instead of `android.app.Fragment`, otherwise they won't be notified.
147
+
**Limitation:**: Your fragments need to extend from `android.support.v4.app.Fragment` instead of `android.app.Fragment`, otherwise they won't be notified.
148
148
149
-
### RefreshTokenReceiver for subscribing on token updates
150
-
[GcmRefreshTokenReceiver](https://github.com/VictorAlbertos/RxGcm/blob/master/rx_gcm/src/main/java/rx_gcm/GcmRefreshTokenReceiver.java) implementation will be called when the token has been modified. As the [documentation](https://developers.google.com/android/reference/com/google/android/gms/iid/InstanceIDListenerService#onTokenRefresh) points out, the token device may need to be refreshed for some particular reason.
149
+
### RefreshTokenReceiver
150
+
[GcmRefreshTokenReceiver](https://github.com/VictorAlbertos/RxGcm/blob/master/rx_gcm/src/main/java/rx_gcm/GcmRefreshTokenReceiver.java) implementation will be called when the token has been updated. As the [documentation](https://developers.google.com/android/reference/com/google/android/gms/iid/InstanceIDListenerService#onTokenRefresh) points out, the token device may need to be refreshed for some particular reason.
@@ -168,8 +168,7 @@ If at some point you need to retrieve the gcm token device -e.g for updating the
168
168
169
169
170
170
### Register RxGcm classes
171
-
Once you have implemented GcmReceiverData and GcmReceiverUIBackground interfaces is time to register them in your Android `Application` class calling [RxGcm.Notifications.register](https://github.com/VictorAlbertos/RxGcm/blob/master/rx_gcm/src/main/java/rx_gcm/internal/RxGcm.java#L79).
172
-
Plus, register `RefreshTokenReceiver implementation` too at this point.
171
+
Once you have implemented `GcmReceiverData` and `GcmReceiverUIBackground` interfaces is time to register them in your Android `Application` class calling [RxGcm.Notifications.register](https://github.com/VictorAlbertos/RxGcm/blob/master/rx_gcm/src/main/java/rx_gcm/internal/RxGcm.java#L79). Plus, register `RefreshTokenReceiver` implementation too at this point.
0 commit comments