@daily-co/react-native-daily-js 0.88.0 → 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.
package/android/src/main/java/com/daily/reactlibrary/DailyOngoingMeetingForegroundService.java
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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"
|
|
@@ -1785,9 +1785,6 @@ export interface DailyCall {
|
|
|
1785
1785
|
updateReceiveSettings(
|
|
1786
1786
|
receiveSettings: DailyReceiveSettingsUpdates
|
|
1787
1787
|
): Promise<DailyReceiveSettings>;
|
|
1788
|
-
updateInputSettings(
|
|
1789
|
-
inputSettings: DailyInputSettings
|
|
1790
|
-
): Promise<{ inputSettings: DailyInputSettings }>;
|
|
1791
1788
|
startCamera(properties?: DailyCallOptions): Promise<void>;
|
|
1792
1789
|
startLocalAudioLevelObserver(interval?: number): Promise<void>;
|
|
1793
1790
|
isLocalAudioLevelObserverRunning(): boolean;
|