Skip to content

Commit 31ef44c

Browse files
Jawnnypoorogerhu
authored andcommitted
Update docs and make job tags constants
1 parent 1729c76 commit 31ef44c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

fcm/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ Add dependency to the application level `build.gradle` file.
1111
dependencies {
1212
implementation 'com.parse:parse-android:latest.version.here'
1313
implementation 'com.parse:parse-android-fcm:latest.version.here'
14-
15-
implementation 'com.google.firebase:firebase-messaging:12.0.1'
1614
}
1715
```
18-
Then, follow Google's docs for [setting up an Firebase app](https://firebase.google.com/docs/cloud-messaging/android/client). Although the steps are different for setting up FCM with Parse, it is also a good idea to read over the [Firebase FCM Setup](https://firebase.google.com/docs/cloud-messaging/android/client).
16+
Then, follow Google's docs for [setting up an Firebase app](https://firebase.google.com/docs/android/setup). Although the steps are different for setting up FCM with Parse, it is also a good idea to read over the [Firebase FCM Setup](https://firebase.google.com/docs/cloud-messaging/android/client).
1917

2018
You will then need to register some things in your manifest, specifically:
2119
```xml

fcm/src/main/java/com/parse/fcm/ParseFCM.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public class ParseFCM {
2020

2121
static final String TAG = "ParseFCM";
2222

23+
private static final String JOB_TAG_UPLOAD_TOKEN = "upload-token";
24+
2325
/**
2426
* You can call this manually if you are overriding the {@link com.google.firebase.iid.FirebaseInstanceIdService}
2527
* @param context context
@@ -36,7 +38,7 @@ public static void scheduleTokenUpload(Context context) {
3638
Constraint.ON_ANY_NETWORK
3739
)
3840
.setService(ParseFirebaseJobService.class) // the JobService that will be called
39-
.setTag("upload-token") // uniquely identifies the job
41+
.setTag(JOB_TAG_UPLOAD_TOKEN) // uniquely identifies the job
4042
.build();
4143

4244
dispatcher.mustSchedule(job);

gcm/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ Add dependency to the application level `build.gradle` file.
1414
dependencies {
1515
implementation 'com.parse:parse-android:latest.version.here'
1616
implementation 'com.parse:parse-android-gcm:latest.version.here'
17-
18-
implementation "com.google.android.gms:play-services-gcm:latest.version.here"
1917
}
2018
```
2119
You will then need to register some things in your manifest, firstly, the GCM sender ID:
@@ -34,7 +32,7 @@ Next:
3432
android:permission="com.google.android.c2dm.permission.SEND" >
3533
<intent-filter>
3634
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
37-
<category android:name="com.your.package.name.here" />
35+
<category android:name="${packageName}" />
3836
</intent-filter>
3937
</receiver>
4038
```

gcm/src/main/java/com/parse/gcm/ParseGCM.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public class ParseGCM {
2929

3030
static final String TAG = "ParseGCM";
3131

32+
private static final String JOB_TAG_REGISTER = "register";
33+
3234
/**
3335
* Register your app to start receiving GCM pushes
3436
*
@@ -48,7 +50,7 @@ public static void register(Context context) {
4850
Constraint.ON_ANY_NETWORK
4951
)
5052
.setService(ParseGCMJobService.class) // the JobService that will be called
51-
.setTag("initialize") // uniquely identifies the job
53+
.setTag(JOB_TAG_REGISTER) // uniquely identifies the job
5254
.build();
5355

5456
dispatcher.mustSchedule(job);

0 commit comments

Comments
 (0)