File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ public class MainActivity extends ReactActivity {
60
60
61
61
1 . In ` android/app/src/main/AndroidManifest.xml ` add these permissions:
62
62
63
-
64
63
``` xml
65
64
<uses-permission android : name =" android.permission.BIND_TELECOM_CONNECTION_SERVICE" />
66
65
<uses-permission android : name =" android.permission.FOREGROUND_SERVICE" />
@@ -72,7 +71,12 @@ public class MainActivity extends ReactActivity {
72
71
<service android : name =" io.wazo.callkeep.VoiceConnectionService"
73
72
android : label =" Wazo"
74
73
android : permission =" android.permission.BIND_TELECOM_CONNECTION_SERVICE"
75
- android : foregroundServiceType =" camera|microphone" >>
74
+ // Use this to target android >= 11
75
+ android:foregroundServiceType="camera|microphone"
76
+ // For android < 11
77
+ android:foregroundServiceType="phoneCall"
78
+ >
79
+
76
80
<intent-filter >
77
81
<action android : name =" android.telecom.ConnectionService" />
78
82
</intent-filter >
@@ -81,6 +85,8 @@ public class MainActivity extends ReactActivity {
81
85
</application >
82
86
```
83
87
88
+ Beware to choose the right ` foregroundServiceType ` depending on the version of Android you want to target.
89
+
84
90
2 . To be able to wake up your killed application when making an outgoing call form the native Phone application:
85
91
86
92
Add this in the ` application ` node of ` android/app/src/main/AndroidManifest.xml ` :
You can’t perform that action at this time.
0 commit comments