@daily-co/react-native-daily-js 0.87.1 → 0.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,7 @@ import android.content.Context;
10
10
  import android.content.Intent;
11
11
  import android.os.Build;
12
12
  import android.os.IBinder;
13
+ import android.util.Log;
13
14
 
14
15
  import androidx.annotation.Nullable;
15
16
  import androidx.annotation.RequiresApi;
@@ -38,7 +39,13 @@ public class DailyOngoingMeetingForegroundService extends Service {
38
39
  intent.putExtra(EXTRA_TITLE, title);
39
40
  intent.putExtra(EXTRA_SUBTITLE, subtitle);
40
41
  intent.putExtra(EXTRA_ICON_NAME, iconName);
41
- ContextCompat.startForegroundService(context, intent);
42
+ try {
43
+ ContextCompat.startForegroundService(context, intent);
44
+ } catch (SecurityException | IllegalStateException e) {
45
+ // IllegalStateException covers ForegroundServiceStartNotAllowedException (Android 12+),
46
+ // thrown when the app is in the background.
47
+ Log.e(TAG, "Failed to start foreground service", e);
48
+ }
42
49
  }
43
50
 
44
51
  public static void stop(Context context) {
@@ -86,7 +93,14 @@ public class DailyOngoingMeetingForegroundService extends Service {
86
93
  .setOnlyAlertOnce(true)
87
94
  .build();
88
95
 
89
- startForeground(NOTIFICATION_ID, notification);
96
+ try {
97
+ startForeground(NOTIFICATION_ID, notification);
98
+ } catch (SecurityException | IllegalStateException e) {
99
+ // SecurityException (Android 14+): camera/microphone service types require the app to be
100
+ // in the foreground. IllegalStateException covers ForegroundServiceStartNotAllowedException.
101
+ Log.e(TAG, "Failed to promote service to foreground", e);
102
+ stopSelf();
103
+ }
90
104
 
91
105
  return START_NOT_STICKY;
92
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daily-co/react-native-daily-js",
3
- "version": "0.87.1",
3
+ "version": "0.89.0",
4
4
  "description": "React Native library for making video calls using Daily",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "baseUrl": "https://github.com/daily-co/react-native-daily-js"
31
31
  },
32
32
  "dependencies": {
33
- "@daily-co/daily-js": "^0.92.2",
33
+ "@daily-co/daily-js": "^0.94.0",
34
34
  "@types/react-native-background-timer": "^2.0.0",
35
35
  "base-64": "^1.0.0",
36
36
  "react-native-url-polyfill": "^1.1.2"
@@ -1216,7 +1216,11 @@ export interface DailyEventObjectDialinError extends DailyEventObjectBase {
1216
1216
  sessionId: string;
1217
1217
  userId?: string;
1218
1218
  type?: 'start-failed' | null;
1219
- details?: { sipEndpoint?: string };
1219
+ details?: {
1220
+ sipEndpoint?: string;
1221
+ sipStatusCode?: number;
1222
+ sipReasonPhrase?: string;
1223
+ };
1220
1224
  actionTraceId?: string;
1221
1225
  provider: string;
1222
1226
  sipCallId?: string;
@@ -1275,7 +1279,12 @@ export interface DailyEventObjectDialOutError extends DailyEventObjectBase {
1275
1279
  errorMsg: string;
1276
1280
  sessionId?: string;
1277
1281
  userId?: string;
1278
- details?: { destination?: string; sipHeaders?: { [key: string]: string } };
1282
+ details?: {
1283
+ destination?: string;
1284
+ sipHeaders?: { [key: string]: string };
1285
+ sipStatusCode?: number;
1286
+ sipReasonPhrase?: string;
1287
+ };
1279
1288
  actionTraceId?: string;
1280
1289
  provider: string;
1281
1290
  sipCallId?: string;
@@ -1776,9 +1785,6 @@ export interface DailyCall {
1776
1785
  updateReceiveSettings(
1777
1786
  receiveSettings: DailyReceiveSettingsUpdates
1778
1787
  ): Promise<DailyReceiveSettings>;
1779
- updateInputSettings(
1780
- inputSettings: DailyInputSettings
1781
- ): Promise<{ inputSettings: DailyInputSettings }>;
1782
1788
  startCamera(properties?: DailyCallOptions): Promise<void>;
1783
1789
  startLocalAudioLevelObserver(interval?: number): Promise<void>;
1784
1790
  isLocalAudioLevelObserverRunning(): boolean;