From 047652f429bb4f4cdf9728344b70c08d80336b3c Mon Sep 17 00:00:00 2001 From: Ulrich GIBERNE Date: Fri, 14 Nov 2025 15:52:48 -0400 Subject: [PATCH] update the headless task time out and make sure it ends --- android/gradle.properties | 2 +- android/src/main/AndroidManifest.xml | 3 +- .../AirshipHeadlessEventService.kt | 2 +- example/index.js | 29 +++++++++++++++++++ example/src/App.tsx | 17 ----------- react-native-airship.podspec | 2 +- 6 files changed, 34 insertions(+), 21 deletions(-) diff --git a/android/gradle.properties b/android/gradle.properties index 6e1d1274..6339358a 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -3,4 +3,4 @@ Airship_minSdkVersion=23 Airship_targetSdkVersion=36 Airship_compileSdkVersion=36 Airship_ndkversion=26.1.10909125 -Airship_airshipProxyVersion=14.9.0 +Airship_airshipProxyVersion=14.10.0 diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 90af1c90..72d224e8 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -9,7 +9,8 @@ + android:exported="false" + android:stopWithTask="true" /> { + // Handle push received + console.log("PushReceived"); + Airship.channel.editAttributes() + .setAttribute("ulrich_first_param", "Ulrich RN 25") + .apply(); + Airship.channel.editTags() + .addTags(["Ulrich RN Receive 25"]) + .apply() +}); + +// Set up event listeners +Airship.addListener(EventType.NotificationResponse, (event) => { + // Handle notification responses +}); + +Airship.addListener(EventType.PushReceived, (event) => { + // Handle push received +}); + +Airship.addListener(EventType.ChannelCreated, (event) => { + // Handle channel creation +}); + +Airship.addListener(EventType.PushNotificationStatusChangedStatus, (event) => { + // Handle push notification status changes +}); AppRegistry.registerComponent(appName, () => App); diff --git a/example/src/App.tsx b/example/src/App.tsx index 3ff8e37f..a62d4d60 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -32,23 +32,6 @@ export default function App() { } }); - // Set up event listeners - Airship.addListener(EventType.NotificationResponse, (event) => { - // Handle notification responses - }); - - Airship.addListener(EventType.PushReceived, (event) => { - // Handle push received - }); - - Airship.addListener(EventType.ChannelCreated, (event) => { - // Handle channel creation - }); - - Airship.addListener(EventType.PushNotificationStatusChangedStatus, (event) => { - // Handle push notification status changes - }); - setIsAirshipReady(true); } catch (error) { setAirshipError(error instanceof Error ? error.message : String(error)); diff --git a/react-native-airship.podspec b/react-native-airship.podspec index 598e4ee0..2b75460b 100644 --- a/react-native-airship.podspec +++ b/react-native-airship.podspec @@ -18,5 +18,5 @@ Pod::Spec.new do |s| install_modules_dependencies(s) - s.dependency "AirshipFrameworkProxy", "14.9.0" + s.dependency "AirshipFrameworkProxy", "14.10.0" end