Skip to content

Commit

Permalink
Merge pull request #387 from urbanairship/MOBILE-2959
Browse files Browse the repository at this point in the history
Release 14.0.0
  • Loading branch information
Ulrico972 authored Mar 10, 2022
2 parents 55d782e + 5034fcd commit 99f7d0e
Show file tree
Hide file tree
Showing 14 changed files with 290 additions and 606 deletions.
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
# Cordova Plugin Changelog

## Version 13.3.0 - February 25, 2021
## Version 14.0.0 - March 10, 2022
Major release that changes the config returned by `getPreferenceCenterConfig`.

### Changes
- Updated Android SDK to 16.3.3
- Removed setting targetSdkVersion
- Fixed editing subscription lists on iOS
- Fixed `setUseCustomPreferenceCenterUi` on Android
- Added new `enableUserNotifications` that returns a boolean result

## Version 13.3.0 - February 25, 2022
Minor release that updates to latest Airship SDKs and adds support for Preference Center.

### Changes
- Updated iOS SDK to 16.4.0 and Android SDK to 16.3.1
- Added preference center methods: `setUseCustomPreferenceCenterUi`, `getPreferenceCenterConfig`, `editChannelSubscriptionLists`, `editContactSubscriptionLists`, `getChannelSubscriptionLists`, `getContactSubscriptionLists`
- Added `urbanairship.open_preference_center` event

## Version 13.2.0 - February 1, 2021
## Version 13.2.0 - February 1, 2022
Minor release that updates the Airship SDKs to 16.2.0

### Changes
- Update iOS & Android Airship SDK to 16.2.0

## Version 13.1.1 - January 11, 2021
## Version 13.1.1 - January 11, 2022
Patch release that updates to latest Airship SDKs and fixes an opt-in issue
with iOS when enable_push_onlaunch flag is false/not set.

Expand Down
2 changes: 1 addition & 1 deletion urbanairship-accengage-cordova/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "urbanairship-accengage-cordova",
"version": "13.3.0",
"version": "14.0.0",
"description": "Urban Airship-Accengage Cordova plugin",
"cordova": {
"id": "urbanairship-accengage-cordova",
Expand Down
6 changes: 3 additions & 3 deletions urbanairship-accengage-cordova/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="urbanairship-accengage-cordova"
version="13.3.0"
version="14.0.0"
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">

Expand All @@ -16,13 +16,13 @@
<engine name="cordova" version=">=9.0.1"/>
</engines>

<dependency id="urbanairship-cordova" version="13.3.0"/>
<dependency id="urbanairship-cordova" version="14.0.0"/>

<!-- ios -->
<platform name="ios">

<config-file target="*-Info.plist" parent="UACordovaPluginVersion">
<string>13.3.0</string>
<string>14.0.0</string>
</config-file>

<!-- Airship Accengage Module -->
Expand Down
10 changes: 1 addition & 9 deletions urbanairship-accengage-cordova/src/android/build-extras.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
dependencies {
configurations.all {
resolutionStrategy { force 'androidx.core:core:1.7.0' }
}

implementation 'com.urbanairship.android:urbanairship-accengage:16.3.1'
implementation 'com.urbanairship.android:urbanairship-accengage:16.3.3'
}

cdvPluginPostBuildExtras.push({
android {
compileSdkVersion 31

defaultConfig {
targetSdkVersion 31
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand Down
2 changes: 1 addition & 1 deletion urbanairship-cordova/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "urbanairship-cordova",
"version": "13.3.0",
"version": "14.0.0",
"description": "Urban Airship Cordova plugin",
"cordova": {
"id": "urbanairship-cordova",
Expand Down
6 changes: 3 additions & 3 deletions urbanairship-cordova/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="urbanairship-cordova"
version="13.3.0"
version="14.0.0"
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">

Expand Down Expand Up @@ -40,7 +40,7 @@
<config-file parent="/manifest/application" target="AndroidManifest.xml">
<meta-data
android:name="com.urbanairship.cordova.version"
android:value="13.3.0"/>
android:value="14.0.0"/>

<meta-data
android:name="com.urbanairship.autopilot"
Expand Down Expand Up @@ -145,7 +145,7 @@
</config-file>

<config-file target="*-Info.plist" parent="UACordovaPluginVersion">
<string>13.3.0</string>
<string>14.0.0</string>
</config-file>

<config-file parent="/widget" target="config.xml">
Expand Down
23 changes: 8 additions & 15 deletions urbanairship-cordova/src/android/PluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void sendShowInboxEvent(@NonNull ShowInboxEvent showInboxEvent) {
/**
* Called to open the preference center when use custom UI is disabled.
*
* @param sendPreferenceCenterEvent .
* @param preferenceCenterEvent .
*/
public void sendPreferenceCenterEvent(@NonNull PreferenceCenterEvent preferenceCenterEvent) {
synchronized (lock) {
Expand Down Expand Up @@ -183,19 +183,6 @@ public String getDefaultNotificationChannelId() {
return sharedPreferences.getString(DEFAULT_NOTIFICATION_CHANNEL_ID, null);
}

/**
* Sets the default notification channel ID.
* @param value The value.
*/
public void setDefaultNotificationChannelId(@Nullable String value) {
sharedPreferences.edit().putString(DEFAULT_NOTIFICATION_CHANNEL_ID, value).apply();
}


public void setUseCustomPreferenceCenterUi(@NonNull String preferenceCenterId, boolean useCustomUi) {
sharedPreferences.edit().putBoolean(useCustomPreferenceCenterUiKey(preferenceCenterId), useCustomUi).apply();
}

public boolean getUseCustomPreferenceCenterUi(@NonNull String preferenceCenterId) {
return sharedPreferences.getBoolean(useCustomPreferenceCenterUiKey(preferenceCenterId), false);
}
Expand Down Expand Up @@ -674,6 +661,12 @@ public ConfigEditor setCloudSite(String site) {
return this;
}

@NonNull
public ConfigEditor setUseCustomPreferenceCenterUi(@NonNull String preferenceCenterId, boolean useCustomUi) {
editor.putBoolean(useCustomPreferenceCenterUiKey(preferenceCenterId), useCustomUi);
return this;
}

/**
* Applies the changes.
*/
Expand All @@ -682,4 +675,4 @@ void apply() {
}
}

}
}
Loading

0 comments on commit 99f7d0e

Please sign in to comment.