@qusaieilouti99/call-manager 0.1.45 → 0.1.46

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.
@@ -1,22 +1,67 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.margelo.nitro.qusaieilouti99.callmanager">
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
3
2
 
4
- <!-- Essential permissions that the library requires -->
3
+ <!-- REQUIRED FOR TELECOM API (Self-managed connections) -->
5
4
  <uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
6
- <uses-permission android:name="android.permission.BIND_TELECOM_CONNECTION_SERVICE" />
5
+ <!-- Required for recording audio in calls -->
7
6
  <uses-permission android:name="android.permission.RECORD_AUDIO" />
7
+ <!-- Required for changing audio routes like speakerphone -->
8
8
  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
9
+ <!-- For keeping screen awake during calls -->
9
10
  <uses-permission android:name="android.permission.WAKE_LOCK" />
11
+ <!-- For vibrating the device (e.g., incoming call) -->
10
12
  <uses-permission android:name="android.permission.VIBRATE" />
11
- <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
12
- <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
13
- <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
14
- <uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
15
13
 
16
- <!-- Bluetooth permissions -->
14
+ <!-- Bluetooth permissions for audio routing -->
15
+ <!-- For Android 11 (API 30) and lower -->
17
16
  <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
18
17
  <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
18
+ <!-- For Android 12 (API 31) and higher -->
19
19
  <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
20
20
 
21
- <!-- No components needed here - they're declared in app manifest -->
21
+ <!-- Required for foreground service on older devices (< Android P) -->
22
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
23
+ <!-- Required for foreground service with phoneCall type on Android 12 (API 31) and higher -->
24
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
25
+
26
+ <application>
27
+ <!-- Your CallActivity for full-screen incoming call UI -->
28
+ <activity
29
+ android:name=".CallActivity"
30
+ android:exported="true"
31
+ android:showOnLockScreen="true"
32
+ android:turnScreenOn="true"
33
+ android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
34
+ android:screenOrientation="portrait"
35
+ android:launchMode="singleTop"
36
+ android:excludeFromRecents="true"
37
+ android:taskAffinity=""
38
+ android:windowSoftInputMode="adjustResize">
39
+ <intent-filter>
40
+ <action android:name="android.intent.action.VIEW"/>
41
+ <category android:name="android.intent.category.DEFAULT"/>
42
+ </intent-filter>
43
+ </activity>
44
+
45
+ <!-- The ConnectionService, crucial for Telecom API integration -->
46
+ <service
47
+ android:name=".MyConnectionService"
48
+ android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
49
+ android:exported="true">
50
+ <intent-filter>
51
+ <action android:name="android.telecom.ConnectionService" />
52
+ </intent-filter>
53
+ </service>
54
+
55
+ <!-- The foreground service to keep the call alive in the background -->
56
+ <service
57
+ android:name=".CallForegroundService"
58
+ android:enabled="true"
59
+ android:exported="false"
60
+ android:foregroundServiceType="phoneCall" />
61
+
62
+ <!-- Receiver for notification actions (Answer/Decline) -->
63
+ <receiver
64
+ android:name=".CallNotificationActionReceiver"
65
+ android:exported="false" />
66
+ </application>
22
67
  </manifest>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qusaieilouti99/call-manager",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
4
4
  "description": "Call manager",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",