Skip to content

Commit

Permalink
Release 9.1.0 with migration guide (#388)
Browse files Browse the repository at this point in the history
* Release 9.1.0

* Add note about new GPS package
  • Loading branch information
rlepinski authored Apr 20, 2018
1 parent 0b16746 commit 0d64ddf
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 36 deletions.
29 changes: 28 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
Android ChangeLog
=================

Migration Guide: http://docs.urbanairship.com/topic_guides/android_migration.html.
[Migration Guides](https://github.com/urbanairship/android-library/tree/master/documentation/migration)

Version 9.1.0 - April 18, 2018
==============================

Minor release that introduces support for FCM apis, modular packages, and in-app message design
updates. For FCM migration, please follow the [FCM Migration Guide](https://github.com/urbanairship/android-library/blob/master/documentation/migration/migration-guide-fcm.md).

Changes
-------
- Added support for FCM Google Play Services dependency.
- When using `urbanairship-fcm`, setting the FCM sender ID in the airship config options is now optional.
- Moved push providers into own packages - `urbanairship-fcm`, `urbanairship-gcm`, `urbanairship-adm`,
and `urbanairship-core`. The package `urbanairship-sdk` still exists and is now just a wrapper package
that depends on gcm, adm, and core to prevent breaking apps.
- Deprecated `urbanairship-sdk` and `urbanairship-gcm` packages. They will be dropped in SDK release 10.0.
- Updated in-app message designs.
- Added support to display an in-app modal message as fullscreen on smaller screen devices.
- Normalized the custom event builder APIs.
- Added metadata option to enable local storage in Urban Airship webviews.
- Updated to Play Services version 15.0.0 and Support Library 27.1.1. Tracking
Advertising IDs now require the `play-services-ads-identifier` dependency.

Bug Fixes
---------
- Added calls to takeOff autopilot when in-app message activities are being restored when the app is suspended.
- Fixed packages not declaring the proper dependencies in the pom file.


Version 9.0.6 - April 5, 2018
=============================
Expand Down
28 changes: 5 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ One of our engineers will verify receipt of the agreement before approving your
## Requirements
- minSdkVersion 16+
- compileSdkVersion 27
- Google Play Services 12.0.1+
- Google Play Services 15.0.0+

## Quickstart

Include Urban Airship into the build.gradle file:
1) Include Urban Airship into the build.gradle file:

```
dependencies {
Expand All @@ -31,27 +31,12 @@ Include Urban Airship into the build.gradle file:
// Urban Airship SDK - FCM
implementation 'com.urbanairship.android:urbanairship-fcm:9.1.0'
implementation "com.google.firebase:firebase-messaging:12.0.1"
// Recommended for location services
implementation 'com.google.android.gms:play-services-location:12.0.1'
}
```

Add a google-services.json file to your project. This can be done in one of two ways:

* Use the [Firebase Assistant](https://developer.android.com/studio/write/firebase.html) tool in Android Studio

or:

* [Download the google-services.json file](https://support.google.com/firebase/answer/7015592)) from the [Firebase Console](https://console.firebase.google.com) and then copy it into your project's module folder, typically `app/`

Add the google-services plugin to your app-level build.gradle:
2) [Add Firebase to your app](https://firebase.google.com/docs/android/setup#add_firebase_to_your_app).

```
apply plugin: 'com.google.gms.google-services'
```

Create a new `airshipconfig.properties` file with your application’s settings:
3) Create a new `airshipconfig.properties` file with your application’s settings:

```
developmentAppKey = Your Development App Key
Expand All @@ -68,9 +53,6 @@ Create a new `airshipconfig.properties` file with your application’s settings:
developmentLogLevel = DEBUG
productionLogLevel = ERROR
# FCM Sender ID
fcmSenderId = Your Google API Project Number
# Notification customization
notificationIcon = ic_notification
notificationAccentColor = #ff0000
Expand All @@ -79,7 +61,7 @@ Create a new `airshipconfig.properties` file with your application’s settings:
notificationChannel = "customChannel"
```

Set the Autopilot meta-data in the AndroidManifest.xml file:
4) Set the Autopilot meta-data in the AndroidManifest.xml file:

```
<meta-data android:name="com.urbanairship.autopilot"
Expand Down
4 changes: 2 additions & 2 deletions airship.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Airship Version - major.minor.patch
version = 9.0.6
version = 9.1.0

# Airship Verson Qualifier beta, release, etc...
#versionQualifier = beta
Expand All @@ -8,4 +8,4 @@ version = 9.0.6
supportLibVersion = 27.1.1

# Play Services Version
playServicesVersion = 12.0.1
playServicesVersion = 15.0.0
1 change: 1 addition & 0 deletions documentation/migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
# Urban Airship Android SDK Migration Guides
* [Current Migration Guide](migration-guide.md)
* [Legacy Migration Guide](migration-guide-legacy.md)
* [FCM Migration Guide](migration-guide-fcm.md)
50 changes: 50 additions & 0 deletions documentation/migration/migration-guide-fcm.md
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);
}
```
7 changes: 7 additions & 0 deletions documentation/migration/migration-guide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Urban Airship Android SDK Migration Guide

## UrbanAirship Library 9.0.x to 9.1.x

### FCM Migration

For FCM migration, please follow the [FCM Migration Guide](https://github.com/urbanairship/android-library/tree/master/documentation/migration/migration-guide-fcm.md).


## UrbanAirship Library 8.x to 9.0.0

### GCM
Expand Down
14 changes: 4 additions & 10 deletions sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@ Sample application for the Urban Airship SDK.
Copy [airshipconfig.properties.sample](src/main/assets/airshipconfig.properties.sample) to `airshipconfig.properites` in
the assets directory.

Update `airshipconfig.properties` with your application's config.

Configure a push provider:
- [Amazon setup docs](https://docs.urbanairship.com/platform/push-providers/adm/)
- [FCM setup docs](https://docs.urbanairship.com/platform/push-providers/fcm/)

Add a google-services.json file to your project. This can be done in one of two ways:
- Use the [Firebase Assistant](https://developer.android.com/studio/write/firebase.html) tool in Android Studio
- [Download the google-services.json file](https://support.google.com/firebase/answer/7015592)) from the [Firebase Console](https://console.firebase.google.com) and then copy it into your project's module folder, typically `app/`

Setup:
- Update `airshipconfig.properties` with your application's config.
- [Add Firebase to your app](https://firebase.google.com/docs/android/setup#add_firebase_to_your_app).
- Optionally, add ADM - [Amazon setup docs](https://docs.urbanairship.com/platform/push-providers/adm/)
1 change: 1 addition & 0 deletions urbanairship-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies {
api "com.android.support:support-annotations:${airshipProperties.supportLibVersion}"

// Optional
compileOnly "com.google.android.gms:play-services-ads-identifier:${airshipProperties.playServicesVersion}"
compileOnly "com.google.android.gms:play-services-location:${airshipProperties.playServicesVersion}"
compileOnly "com.android.support:appcompat-v7:${airshipProperties.supportLibVersion}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ private int onUpdateAdvertisingId() {

case UAirship.ANDROID_PLATFORM:
if (!PlayServicesUtils.isGoogleAdsDependencyAvailable()) {
Logger.error("Unable to track Advertising ID. Dependency `play-services-ads-identifier` not found.");
break;
}

Expand Down

0 comments on commit 0d64ddf

Please sign in to comment.