Skip to content

Commit bc19ebd

Browse files
Update README.md
1 parent 29c2bcc commit bc19ebd

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public class AppGcmReceiverUIBackground implements GcmReceiverUIBackground {

106106
```
107107

108108
#### 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.
110110

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.
112112

113113
```java
114114
public class ActivityIssue extends Activity implements GcmReceiverUIForeground {


@@ -144,10 +144,10 @@ public class FragmentSupply extends android.support.v4.app.Fragment implements G
144144
}
145145
```
146146

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.
148148

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.
151151

152152
```java
153153
public class RefreshTokenReceiver implements GcmRefreshTokenReceiver {
@@ -168,8 +168,7 @@ If at some point you need to retrieve the gcm token device -e.g for updating the
168168

169169

170170
### 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.
173172

174173
```java
175174
public class RxSampleApp extends Application {

0 commit comments

Comments
 (0)