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
// Add for push notification support -- add FCM or GCM but not both.
32
+
implementation "com.parse:parse-fcm-android:$parseVersion" // migrate to FCM
33
+
// implementation "com.parse:parse-gcm-android:$parseVersion" // deprecated GCM support
34
+
23
35
}
24
36
```
25
37
38
+
#### Migrating to Firebase
39
+
40
+
If you are upgrading from a previous Parse SDK version and rely on push notifications, it is highly recommended you migrate to Firebase Cloud Messaging (FCM) since Google has announced it will be deprecated in April 2019. To migrate to FCM, you will only need to make changes to the client. No changes are needed on the Parse Server side.
41
+
42
+
Verify you have done the following:
43
+
44
+
-[ ] Added app to [Firebase console](https://console.firebase.google.com/u/0/).
45
+
-[ ] Added the `com.google.gms.google-services` Gradle plugin (see [setup guide](https://firebase.google.com/docs/android/setup))
- [ ] Downloaded and added [google-services.json](https://support.google.com/firebase/answer/7015592) to your `app/` dir from your Firebase app.
68
+
- [ ] Added `ParseFirebaseInstanceIdService` and `ParseFirebaseMessagingService` to your `AndroidManifest.xml` file (see [docs](http://docs.parseplatform.org/tutorials/android-push-notifications/))
69
+
- [ ] Removed `GcmBroadcastReceiver`, `PushService`, `com.parse.push.gcm_sender_id` if upgrading from GCM.
70
+
71
+
Assuming these major steps are done, adding the `parse-fcm-android` package will automatically instantiate a [ParseFirebaseJobService](https://github.com/parse-community/Parse-SDK-Android/blob/master/fcm/src/main/java/com/parse/fcm/ParseFirebaseJobService.java) that will register for a FCM token when the app starts. See the setup instructions below to verify that FCM registration works.
72
+
26
73
- **Option 2:** Compiling for yourself into AAR file
27
74
28
75
If you want to manually compile the SDK, begin by cloning the repository locally or retrieving the source code for a particular [release][releases]. Open the project in Android Studio and run the following commands in the Terminal of Android Studio:
29
-
76
+
30
77
```
31
78
./gradlew clean build
32
79
```
33
80
Output file can be found in `Parse/build/outputs/` with extension .aar
34
-
81
+
35
82
You can link to your project to your AAR file as you please.
36
83
37
84
@@ -45,6 +92,11 @@ Initialize Parse in a custom class that extends `Application`:
45
92
@Override
46
93
public void onCreate() {
47
94
super.onCreate();
95
+
96
+
// Remove for production, use to verify FCM is working
97
+
// Look for ParseFCM: FCM registration success messages in Logcat to confirm.
0 commit comments