Skip to content
This repository has been archived by the owner on Aug 9, 2020. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorAlbertos authored Jul 14, 2016
1 parent 3051191 commit 37376c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ public class RefreshTokenReceiver implements FcmRefreshTokenReceiver {
```

### Retrieving current token
If at some point you need to retrieve the fcm token device -e.g for updating the value on your server, you could do it easily calling [RxFcm.Notifications.currentToken](https://github.com/VictorAlbertos/RxFcm/blob/master/rx_fcm/src/main/java/rx_fcm/internal/RxFcm.java#L114):
If at some point you need to retrieve the fcm token device -e.g for updating the value on your server, you could do it easily calling [RxFcm.Notifications.currentToken](https://github.com/VictorAlbertos/RxFcm/blob/master/rx_fcm/src/main/java/rx_fcm/internal/RxFcm.java#L89):

```java
RxFcm.Notifications.currentToken().subscribe(token -> {}, error -> {});
```


### Register RxFcm classes
Once you have implemented `FcmReceiverData` and `FcmReceiverUIBackground` interfaces is time to register them in your Android `Application` class calling [RxFcm.Notifications.init](https://github.com/VictorAlbertos/RxFcm/blob/master/rx_fcm/src/main/java/rx_fcm/internal/RxFcm.java#L79). Plus, register `RefreshTokenReceiver` implementation too at this point.
Once you have implemented `FcmReceiverData` and `FcmReceiverUIBackground` interfaces is time to register them in your Android `Application` class calling [RxFcm.Notifications.init](https://github.com/VictorAlbertos/RxFcm/blob/master/rx_fcm/src/main/java/rx_fcm/internal/RxFcm.java#L76). Plus, register `RefreshTokenReceiver` implementation too at this point.

```java
public class RxSampleApp extends Application {
Expand Down Expand Up @@ -207,4 +207,4 @@ You can easily [send http post request](https://firebase.google.com/docs/cloud-m
* [Mockery](https://github.com/VictorAlbertos/Mockery): Android and Java library for mocking and testing networking layers with built-in support for Retrofit.
* [RxCache](https://github.com/VictorAlbertos/RxCache): Reactive caching library for Android and Java.
* [RxActivityResult](https://github.com/VictorAlbertos/RxActivityResult): A reactive-tiny-badass-vindictive library to break with the OnActivityResult implementation as it breaks the observables chain.
* [RxSocialConnect](https://github.com/FuckBoilerplate/RxSocialConnect-Android): OAuth RxJava extension for Android.
* [RxSocialConnect](https://github.com/FuckBoilerplate/RxSocialConnect-Android): OAuth RxJava extension for Android.

0 comments on commit 37376c9

Please sign in to comment.