-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 9.1.0 with migration guide (#388)
* Release 9.1.0 * Add note about new GPS package
- Loading branch information
Showing
9 changed files
with
99 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
### FCM Migration | ||
|
||
FCM migration is optional, but recommended as Google deprecated GCM and is planning on dropping | ||
GCM client APIs in April of 2019. For more info, please read the [GCM F.A.Q](https://developers.google.com/cloud-messaging/faq). | ||
|
||
Urban Airship supports the FCM client library starting in SDK 9.1.0. It is available in a new package | ||
`urbanairship-fcm`. The FCM package is not compatible with the deprecated package `urbanairship-sdk` | ||
and `urbanairship-gcm`. | ||
|
||
Migration Steps: | ||
|
||
- [Add Firebase to your app](https://firebase.google.com/docs/android/setup#add_firebase_to_your_app). | ||
- [Import your GCM project as a Firebase project](https://developers.google.com/cloud-messaging/android/android-migrate-fcm#import-your-gcm-project-as-a-firebase-project). | ||
- Update your build.gradle to use the new `urbanairship-fcm` and remove `urbanairship-sdk`: | ||
|
||
``` | ||
dependencies { | ||
... | ||
// Urban Airship SDK - FCM | ||
implementation 'com.urbanairship.android:urbanairship-fcm:9.1.0' | ||
implementation "com.google.firebase:firebase-messaging:12.0.1" | ||
// Urban Airship SDK - ADM (Optional - if you support ADM) | ||
implementation 'com.urbanairship.android:urbanairship-adm:9.1.0' | ||
} | ||
``` | ||
|
||
|
||
- If your application uses its own `FirebaseMessagingService`, `FirebaseInstanceIDService`, or another | ||
provider that uses FCM, you will need to forward token refresh and message received calls to the | ||
Urban Airship SDK: | ||
|
||
``` | ||
// FirebaseInstanceIdService: | ||
public void onTokenRefresh() { | ||
// Notify Urban Airship that the token is refreshed. | ||
AirshipFirebaseInstanceIdService.processTokenRefresh(getContext()); | ||
} | ||
``` | ||
|
||
``` | ||
// FirebaseMessagingService: | ||
@Override | ||
public void onMessageReceived(RemoteMessage remoteMessage) { | ||
AirshipFirebaseMessagingService.processMessageSync(getContext(), remoteMessage); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters