@poolse/native 0.0.0-stage → 3.1.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +206 -0
  3. package/README.md +116 -2
  4. package/android/build.gradle +58 -0
  5. package/android/consumer-rules.pro +11 -0
  6. package/android/src/main/AndroidManifest.xml +46 -0
  7. package/android/src/main/java/dev/poolse/callcore/CallCoreRuntime.kt +540 -0
  8. package/android/src/main/java/dev/poolse/callcore/CallMachine.kt +492 -0
  9. package/android/src/main/java/dev/poolse/callcore/Ports.kt +132 -0
  10. package/android/src/main/java/dev/poolse/callcore/android/AndroidRingSurface.kt +383 -0
  11. package/android/src/main/java/dev/poolse/callcore/android/CallActionReceiver.kt +45 -0
  12. package/android/src/main/java/dev/poolse/callcore/android/CallCore.kt +578 -0
  13. package/android/src/main/java/dev/poolse/callcore/android/CallForegroundService.kt +294 -0
  14. package/android/src/main/java/dev/poolse/callcore/android/CallHttpClient.kt +207 -0
  15. package/android/src/main/java/dev/poolse/callcore/android/CallMessagingService.kt +161 -0
  16. package/android/src/main/java/dev/poolse/callcore/android/CallVideo.kt +36 -0
  17. package/android/src/main/java/dev/poolse/callcore/android/HandlerTimerPort.kt +42 -0
  18. package/android/src/main/java/dev/poolse/callcore/android/IncomingCallActivity.kt +314 -0
  19. package/android/src/main/java/dev/poolse/callcore/android/MessageNotifications.kt +353 -0
  20. package/android/src/main/java/dev/poolse/callcore/android/MissedCallNotification.kt +103 -0
  21. package/android/src/main/java/dev/poolse/callcore/android/RingBundle.kt +42 -0
  22. package/android/src/main/java/dev/poolse/callcore/android/SnapshotJson.kt +99 -0
  23. package/android/src/main/java/expo/modules/poolsecalls/CallLockscreen.kt +42 -0
  24. package/android/src/main/java/expo/modules/poolsecalls/CallPictureInPicture.kt +92 -0
  25. package/android/src/main/java/expo/modules/poolsecalls/PoolseCallVideoView.kt +64 -0
  26. package/android/src/main/java/expo/modules/poolsecalls/PoolseCallsModule.kt +205 -0
  27. package/android/src/main/livekit/java/dev/poolse/callcore/livekit/LiveKitMediaPort.kt +594 -0
  28. package/android/src/main/livekit/java/dev/poolse/callcore/livekit/LiveKitVideoSurface.kt +107 -0
  29. package/android/src/test/java/dev/poolse/callcore/android/CallHttpClientTest.kt +61 -0
  30. package/app.plugin.js +5 -0
  31. package/dist/index.cjs +197 -0
  32. package/dist/index.cjs.map +1 -0
  33. package/dist/index.d.cts +313 -0
  34. package/dist/index.d.ts +313 -0
  35. package/dist/index.js +161 -0
  36. package/dist/index.js.map +1 -0
  37. package/expo-module.config.json +11 -0
  38. package/ios/Core/CallCoreRuntime.swift +543 -0
  39. package/ios/Core/CallHttpClient.swift +213 -0
  40. package/ios/Core/CallMachine.swift +394 -0
  41. package/ios/Core/PORTS_READY.md +93 -0
  42. package/ios/Core/Ports.swift +238 -0
  43. package/ios/Core/SnapshotEncoding.swift +122 -0
  44. package/ios/Module/PoolseCallVideoView.swift +70 -0
  45. package/ios/Module/PoolseCallsAppDelegateSubscriber.swift +16 -0
  46. package/ios/Module/PoolseCallsModule.swift +150 -0
  47. package/ios/Platform/CallCore.swift +623 -0
  48. package/ios/Platform/CallKitController.swift +326 -0
  49. package/ios/Platform/CallPictureInPicture.swift +145 -0
  50. package/ios/Platform/LiveKitMediaPort.swift +798 -0
  51. package/ios/Platform/LiveKitVideoSurface.swift +68 -0
  52. package/ios/Platform/MessageNotifications.swift +163 -0
  53. package/ios/Platform/Ringback.swift +61 -0
  54. package/ios/Platform/VoipPush.swift +174 -0
  55. package/ios/PoolseCalls.podspec +68 -0
  56. package/package.json +52 -3
  57. package/plugin/index.js +42 -0
  58. package/plugin/package.json +1 -0
  59. package/plugin/withCallDelegate.js +35 -0
  60. package/plugin/withLockscreenCalls.js +84 -0
  61. package/plugin/withNativeCallMedia.js +19 -0
  62. package/plugin/withPictureInPicture.js +28 -0
  63. package/plugin/withRingback.js +86 -0
  64. package/src/expo-modules-core.d.ts +16 -0
  65. package/src/index.ts +564 -0
  66. package/src/react-shims.d.ts +22 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # @poolse/native
2
+
3
+ Formerly `@poolse/react-native-calls` (0.x).
4
+
5
+ ## 3.1.0 — 2026-10-27
6
+
7
+ - Declares `react` as a peer dependency (the package imports it).
8
+ - `expo prebuild` needs Node 20.19 or newer (the config plugin entry is
9
+ an ES module, loaded with `require`).
10
+
11
+ ## 3.0.0 — 2026-10-26
12
+
13
+ - **Renamed** from `@poolse/react-native-calls`: import from
14
+ `@poolse/native` and list `"@poolse/native"` in `app.json` plugins.
15
+ Same API and native module.
16
+ - **License.** From 3.0.0 under the poolse SDK License (see `LICENSE`);
17
+ earlier versions remain MIT.
18
+ - First stable release, together with the other `@poolse/*` packages.
19
+
20
+ ## 0.13.0
21
+
22
+ - **One config plugin.** `["@poolse/react-native-calls", { ringback }]` in
23
+ `app.json` replaces the five per-app plugins (`withNativeCallMedia`,
24
+ `withCallDelegate`, `withLockscreenCalls`, `withPictureInPicture`,
25
+ `withRingback`). Options: `ringback`, `pictureInPicture`, `lockscreen`.
26
+ See "Setup" in the README for the move.
27
+
28
+ ## 0.12.0
29
+
30
+ - `setShowOnLockscreen(enabled)`: keeps the Android activity over the lock
31
+ screen while a call rings or runs (iOS: no-op, CallKit owns it).
package/LICENSE ADDED
@@ -0,0 +1,206 @@
1
+ poolse SDK License
2
+
3
+ Copyright (c) 2026 Torsten Labs DOO. All rights reserved.
4
+
5
+ Version 1.0. Applies to poolse SDK releases from version 3.0.0 onwards.
6
+
7
+
8
+ SUMMARY (NOT PART OF THE LICENSE TERMS)
9
+
10
+ This summary is for convenience only. It is not part of the license and
11
+ has no legal effect. If it differs from the terms below, the terms below
12
+ apply.
13
+
14
+ - You can use, copy and modify the SDK for free, including in
15
+ commercial apps, as long as your app talks to the poolse Services.
16
+ - You can ship the SDK inside your app, compiled or bundled, including
17
+ the native iOS and Android source code needed to build it.
18
+ - You cannot use the SDK with any other backend, use it to build a
19
+ competing chat, realtime, calling or push service, or redistribute
20
+ or sell it as a standalone library or SDK.
21
+ - Keep this license notice in copies of the SDK source.
22
+ - The SDK comes with no warranty.
23
+ - Versions published before 3.0.0 remain under the MIT License.
24
+
25
+
26
+ TERMS AND CONDITIONS
27
+
28
+ 1. Definitions
29
+
30
+ "Licensor" means Torsten Labs DOO, Ilindenska 335, 1200 Tetovo, North
31
+ Macedonia.
32
+
33
+ "You" means the individual or legal entity exercising rights under this
34
+ license. If you accept this license on behalf of an organisation, "you"
35
+ includes that organisation.
36
+
37
+ "SDK" means the software in this package or repository published by the
38
+ Licensor under this license, including source code, compiled code, native
39
+ iOS and Android code, type definitions, configuration plugins, examples
40
+ and documentation, together with any updates the Licensor provides under
41
+ this license.
42
+
43
+ "poolse Services" means the hosted services operated by the Licensor under
44
+ the name "poolse", currently offered at https://poolse.dev, including their
45
+ APIs, realtime, calling and push notification infrastructure. It also
46
+ includes any self-hosted or on-premise deployment of poolse that you have
47
+ licensed directly from the Licensor, for as long as that license is in
48
+ effect.
49
+
50
+ "Application" means a website, mobile app, desktop app, server or other
51
+ software product that you develop and that provides material functionality
52
+ of its own beyond the SDK.
53
+
54
+ "Derivative Work" means any modification of the SDK, and any work that
55
+ contains the SDK or a substantial portion of it.
56
+
57
+ 2. License Grant
58
+
59
+ Subject to the terms of this license, the Licensor grants you a worldwide,
60
+ non-exclusive, non-transferable, royalty-free license to:
61
+
62
+ (a) install, use, copy and modify the SDK, and create Derivative Works,
63
+ solely to develop, test and operate Applications that use the poolse
64
+ Services; and
65
+
66
+ (b) distribute the SDK and your Derivative Works, in source or compiled
67
+ form, only as an integrated part of your Applications. This includes
68
+ bundled or minified JavaScript and the native iOS and Android source
69
+ code that must be included for your Application to be compiled.
70
+
71
+ Your Applications may be commercial, and you may charge for them.
72
+
73
+ 3. Restrictions
74
+
75
+ You may not, and may not allow anyone else to:
76
+
77
+ (a) use the SDK or any Derivative Work with, or adapt it to connect to,
78
+ any backend, API or service other than the poolse Services;
79
+
80
+ (b) use the SDK or any Derivative Work to build, offer or operate a
81
+ product or service that competes with the poolse Services, including
82
+ any chat, messaging, realtime, voice or video calling, or push
83
+ notification service or infrastructure offered to third parties;
84
+
85
+ (c) sell, sublicense, rent, lease or distribute the SDK or any Derivative
86
+ Work on its own, or as a library, SDK, framework, component kit or
87
+ developer tool, rather than as an integrated part of an Application;
88
+
89
+ (d) remove, alter or obscure this license, any copyright notice, or any
90
+ other proprietary notice in the SDK; or
91
+
92
+ (e) use the SDK in violation of applicable law or of the terms of service
93
+ that govern your use of the poolse Services.
94
+
95
+ Nothing in this license grants you any right to use the poolse Services
96
+ themselves. Your use of the poolse Services is governed by your separate
97
+ agreement with the Licensor, including its terms of service.
98
+
99
+ 4. Notices
100
+
101
+ Any copy of the SDK or a Derivative Work in source form, including native
102
+ source code distributed with an Application, must keep this license file
103
+ or a clear reference to it. You do not need to display this license to the
104
+ end users of your Application.
105
+
106
+ 5. Contributions
107
+
108
+ If you submit code, documentation or other material to the Licensor for
109
+ inclusion in the SDK (for example, as a pull request), you grant the
110
+ Licensor a perpetual, worldwide, irrevocable, royalty-free license to use,
111
+ modify, sublicense and distribute that material as part of the SDK or any
112
+ other Licensor product, and you confirm that you have the right to grant
113
+ that license.
114
+
115
+ 6. Ownership
116
+
117
+ The SDK is licensed, not sold. The Licensor and its licensors keep all
118
+ rights, title and interest in the SDK, including all intellectual property
119
+ rights. All rights not expressly granted in this license are reserved. The
120
+ names "poolse" and "Torsten Labs" and their logos are not licensed to you
121
+ except as needed to truthfully describe that your Application uses the
122
+ poolse Services.
123
+
124
+ You own your modifications to the SDK, subject to the Licensor's rights in
125
+ the SDK and to the terms of this license.
126
+
127
+ 7. Feedback
128
+
129
+ If you give the Licensor suggestions or feedback about the SDK, the
130
+ Licensor may use them without any obligation to you.
131
+
132
+ 8. Termination
133
+
134
+ This license ends automatically, without notice, if you breach any of its
135
+ terms. If you cure the breach within 30 days after you become aware of it,
136
+ your license is reinstated, unless the Licensor has notified you in writing
137
+ that it is terminating your license, or you have breached this license
138
+ before.
139
+
140
+ When this license ends, you must stop using and distributing the SDK and
141
+ your Derivative Works, and delete all copies in your possession. Copies of
142
+ Applications already delivered to end users before termination may continue
143
+ to be used by those end users. Sections 3, 5, 6, 7, 9, 10, 11 and 12
144
+ survive termination.
145
+
146
+ 9. Disclaimer of Warranty
147
+
148
+ THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE", WITHOUT WARRANTY OF ANY
149
+ KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE
150
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
151
+ NON-INFRINGEMENT. THE LICENSOR DOES NOT WARRANT THAT THE SDK WILL BE
152
+ ERROR-FREE, SECURE OR UNINTERRUPTED. YOU USE THE SDK AT YOUR OWN RISK.
153
+
154
+ 10. Limitation of Liability
155
+
156
+ TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL THE
157
+ LICENSOR, ITS AFFILIATES OR ITS CONTRIBUTORS BE LIABLE FOR ANY INDIRECT,
158
+ INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY OR PUNITIVE DAMAGES, OR FOR
159
+ ANY LOSS OF PROFITS, REVENUE, DATA, GOODWILL OR BUSINESS OPPORTUNITY,
160
+ ARISING OUT OF OR IN CONNECTION WITH THIS LICENSE OR THE SDK, WHETHER IN
161
+ CONTRACT, TORT (INCLUDING NEGLIGENCE) OR OTHERWISE, EVEN IF ADVISED OF THE
162
+ POSSIBILITY OF SUCH DAMAGES. BECAUSE THE SDK IS PROVIDED FREE OF CHARGE,
163
+ THE LICENSOR'S TOTAL LIABILITY ARISING OUT OF OR IN CONNECTION WITH THIS
164
+ LICENSE OR THE SDK WILL NOT EXCEED ONE HUNDRED EUROS (EUR 100).
165
+
166
+ NOTHING IN THIS LICENSE EXCLUDES OR LIMITS ANY LIABILITY THAT CANNOT BE
167
+ EXCLUDED OR LIMITED UNDER APPLICABLE LAW, INCLUDING LIABILITY FOR WILFUL
168
+ MISCONDUCT OR GROSS NEGLIGENCE.
169
+
170
+ 11. Governing Law and Disputes
171
+
172
+ This license is governed by the laws of the Republic of North Macedonia,
173
+ without regard to its conflict of laws rules. The courts of the Republic of
174
+ North Macedonia have exclusive jurisdiction over any dispute arising out of
175
+ or in connection with this license, except that the Licensor may seek
176
+ injunctive relief to protect its intellectual property in any court of
177
+ competent jurisdiction.
178
+
179
+ 12. General
180
+
181
+ This license is the entire agreement between you and the Licensor about the
182
+ SDK. If any provision is found unenforceable, it will be enforced to the
183
+ maximum extent possible and the remaining provisions stay in effect. A
184
+ failure to enforce a provision is not a waiver. You may not assign this
185
+ license without the Licensor's prior written consent. The Licensor may
186
+ publish new versions of this license; each release of the SDK is governed
187
+ by the version of this license included with it.
188
+
189
+ 13. Earlier Versions
190
+
191
+ Versions of the poolse SDK packages published before version 3.0.0
192
+ (including @poolse/sdk, @poolse/react, @poolse/react-ui and
193
+ @poolse/react-native) were released under the MIT License and remain
194
+ available under the MIT License. This license applies only to versions
195
+ 3.0.0 and later, and to any package first published by the Licensor under
196
+ this license.
197
+
198
+ 14. Contact
199
+
200
+ Questions about this license, or requests for permission beyond it, can be
201
+ sent to legal@poolse.dev.
202
+
203
+ Torsten Labs DOO
204
+ Ilindenska 335
205
+ 1200 Tetovo
206
+ North Macedonia
package/README.md CHANGED
@@ -1,3 +1,117 @@
1
- # Temporary Holding Version
1
+ # `@poolse/native`
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The call engine for phones, for [poolse](https://poolse.dev). A native core
4
+ (Swift on iOS, Kotlin on Android) rings, answers and carries calls with the
5
+ app closed and the phone locked: CallKit and PushKit on iOS, a call service
6
+ and full-screen notifications on Android. You send commands; the core sends
7
+ back one `Snapshot` describing the call. The package also shows poolse's
8
+ chat notifications and gives you helpers for them.
9
+
10
+ Formerly `@poolse/react-native-calls`.
11
+
12
+ Full reference: <https://poolse.dev/docs/sdk/native>
13
+
14
+ ## Requirements
15
+
16
+ - A development or release build. It is a native module, so it isn't in
17
+ Expo Go; without the module every command does nothing and
18
+ `nativeCallsAvailable` is `false`.
19
+ - Peers: `expo`, `expo-notifications`, `react`, `react-native`.
20
+ - Node 20.19 or newer for `expo prebuild`.
21
+ - iOS 15.1+; Android `minSdkVersion` 24.
22
+ - Push credentials (APNs key, FCM service account) for your workspace on the
23
+ poolse dashboard.
24
+
25
+ ## Install and setup
26
+
27
+ ```bash
28
+ npx expo install @poolse/native expo-notifications
29
+ ```
30
+
31
+ In `app.json`, after `expo-notifications`:
32
+
33
+ ```json
34
+ "plugins": [
35
+ "expo-notifications",
36
+ ["@poolse/native", { "ringback": "./assets/sounds/ringback.mp3" }]
37
+ ]
38
+ ```
39
+
40
+ | Option | Default | What it does |
41
+ | ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------- |
42
+ | `ringback` | none | Ships this sound in both apps; pass its base name to `configure({ ringback })`. Lowercase letters, digits and underscores only. |
43
+ | `pictureInPicture` | `true` | Android: the activity may float as a picture-in-picture window. |
44
+ | `lockscreen` | `true` | Android: the app shows over the lock screen when opened for a call. |
45
+
46
+ Always applied on Android: the LiveKit media adapter, and `expo-notifications`
47
+ as the receiver for pushes that aren't calls. On iOS, add `UIBackgroundModes`
48
+ `audio`, `voip` and `remote-notification`, `NSMicrophoneUsageDescription`
49
+ (and `NSCameraUsageDescription` for video) and the `aps-environment`
50
+ entitlement yourself. Then run `npx expo prebuild --clean`.
51
+
52
+ ## Usage
53
+
54
+ ```ts
55
+ import * as calls from '@poolse/native';
56
+
57
+ await calls.configure('https://api.poolse.dev', {
58
+ ringback: 'ringback',
59
+ apnsEnvironment: 'production',
60
+ });
61
+
62
+ const stop = calls.onCallState((snapshot) => render(snapshot)); // Snapshot | null
63
+ render(calls.getCallState());
64
+
65
+ await calls.place(conversationId, { media: 'audio', sessionToken }); // sessionToken: the user's poolse JWT
66
+ calls.answer();
67
+ calls.decline();
68
+ calls.hangUp();
69
+ calls.setMuted(true);
70
+ calls.setCamera(true);
71
+
72
+ // Audio outputs: snapshot.audioOutputs lists the phone, the speaker and each
73
+ // connected headset or Bluetooth device; snapshot.audioOutputId is the one in use.
74
+ function onPickOutput(snapshot: calls.Snapshot, id: string) {
75
+ if (snapshot.audioOutputs.some((o) => o.id === id)) calls.setAudioOutput(id);
76
+ }
77
+ calls.setSpeaker(true); // the one-tap speaker toggle
78
+ ```
79
+
80
+ The full API:
81
+
82
+ - Setup: `configure`, `nativeCallsAvailable`, `getCallState`, `onCallState`.
83
+ - Calls: `place`, `join`, `answer`, `decline`, `hangUp`, `setMuted`,
84
+ `setCamera`, `switchCamera`, `setSpeaker`, `setAudioOutput`,
85
+ `ringIntoCall({ userIds?, externalIds? })`.
86
+ - Rooms (nobody rings): `startRoom(conversationId, { media, sessionToken })`,
87
+ then `join` for the others and `hangUp` to leave.
88
+ - Call waiting: `snapshot.waiting`, `answerWaiting(callId)`,
89
+ `declineWaiting(callId)`.
90
+ - Video: `<CallVideoView participantId | local mirror fit pictureInPicture />`,
91
+ `setPictureInPictureEnabled`, `isInPictureInPicture`,
92
+ `pictureInPictureSupported`, `onPictureInPicture`.
93
+ - Android: `canUseFullScreenIntent`, `openFullScreenIntentSettings`,
94
+ `setShowOnLockscreen`, `takeCallAction`, `onCallAction`.
95
+ - iOS VoIP token: `getVoipToken`, `onVoipToken`. Register it with
96
+ `poolse.devices.register({ token, platform: 'ios', kind: 'voip', environment })`
97
+ from `@poolse/sdk`, and the regular APNs token with `kind: 'alert'`.
98
+ - Chat notifications: `setActiveConversation`, `shouldPresentMessage`,
99
+ `conversationOfNotification`.
100
+ - Socket forwarding (optional): `onCallFinished`, `onRingEnded`. Feed them
101
+ from `@poolse/sdk` 3.1's user channel:
102
+
103
+ ```ts
104
+ const userChannel = poolse.realtime.user(me.id);
105
+ userChannel.onRingEnded((e) => calls.onRingEnded(e.call_id, e.reason));
106
+ userChannel.onCallFinished((e) => calls.onCallFinished(e.call_id, e.reason));
107
+ ```
108
+
109
+ ## Links
110
+
111
+ - Docs: <https://poolse.dev/docs/sdk/native>
112
+ - Source: <https://github.com/poolse-hq/js-sdk>
113
+
114
+ ## License
115
+
116
+ Licensed under the [poolse SDK License](./LICENSE) from 3.0.0; versions
117
+ before 3.0.0 remain MIT.
@@ -0,0 +1,58 @@
1
+ apply plugin: 'com.android.library'
2
+ apply plugin: 'kotlin-android'
3
+
4
+ group = 'dev.poolse.callcore'
5
+ version = '0.1.0'
6
+
7
+ def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
8
+ apply from: expoModulesCorePlugin
9
+ applyKotlinExpoModulesCorePlugin()
10
+ useCoreDependencies()
11
+
12
+ def safeExtGet(prop, fallback) {
13
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
14
+ }
15
+
16
+ // The shipped LiveKit MediaPort lives in its own source set, off the
17
+ // core classpath, so the library carries no SFU dependency unless the
18
+ // app opts in with `-Ppoolse.livekit` (or ext.poolseLiveKit = true).
19
+ def useLiveKit = project.hasProperty('poolse.livekit') ||
20
+ (rootProject.ext.has('poolseLiveKit') && rootProject.ext.get('poolseLiveKit'))
21
+
22
+ android {
23
+ namespace "dev.poolse.callcore"
24
+ compileSdk safeExtGet("compileSdkVersion", 36)
25
+
26
+ defaultConfig {
27
+ minSdkVersion safeExtGet("minSdkVersion", 24)
28
+ targetSdkVersion safeExtGet("targetSdkVersion", 36)
29
+ versionCode 1
30
+ versionName "0.1.0"
31
+ // Keeps the reflectively-loaded LiveKit adapter in minified apps.
32
+ consumerProguardFiles "consumer-rules.pro"
33
+ }
34
+
35
+ if (useLiveKit) {
36
+ sourceSets {
37
+ main {
38
+ java.srcDir "src/main/livekit/java"
39
+ }
40
+ }
41
+ }
42
+ }
43
+
44
+ dependencies {
45
+ implementation 'androidx.core:core-ktx:1.13.1'
46
+ implementation 'com.squareup.okhttp3:okhttp:4.12.0'
47
+ implementation 'com.google.firebase:firebase-messaging:24.0.3'
48
+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1'
49
+
50
+ if (useLiveKit) {
51
+ implementation 'io.livekit:livekit-android:2.11.0'
52
+ }
53
+
54
+ // JVM unit tests (CallHttpClient's parser). The real org.json replaces
55
+ // android.jar's throwing stubs on the test classpath.
56
+ testImplementation 'junit:junit:4.13.2'
57
+ testImplementation 'org.json:json:20180813'
58
+ }
@@ -0,0 +1,11 @@
1
+ # Applied to the HOST app's minified release build.
2
+
3
+ # CallCore loads the LiveKit MediaPort reflectively
4
+ # (Class.forName("dev.poolse.callcore.livekit.LiveKitMediaPort") and its
5
+ # Companion.getFactory), so R8 cannot see the reference: keep it whole.
6
+ -keep class dev.poolse.callcore.livekit.** { *; }
7
+
8
+ # The core's entry points are named in the manifest / by the Expo
9
+ # module registry; keep them (and their companions) un-renamed too.
10
+ -keep class dev.poolse.callcore.android.** { *; }
11
+ -keep class expo.modules.poolsecalls.** { *; }
@@ -0,0 +1,46 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+
3
+ <uses-permission android:name="android.permission.INTERNET" />
4
+ <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
5
+ <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
6
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
7
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
8
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
9
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
10
+ <uses-permission android:name="android.permission.VIBRATE" />
11
+ <uses-permission android:name="android.permission.WAKE_LOCK" />
12
+ <!-- Android 14: a phoneCall-type foreground service requires it. -->
13
+ <uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
14
+
15
+ <application>
16
+ <activity
17
+ android:name="dev.poolse.callcore.android.IncomingCallActivity"
18
+ android:exported="false"
19
+ android:showWhenLocked="true"
20
+ android:turnScreenOn="true"
21
+ android:excludeFromRecents="true"
22
+ android:launchMode="singleInstance"
23
+ android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
24
+
25
+ <receiver
26
+ android:name="dev.poolse.callcore.android.CallActionReceiver"
27
+ android:exported="false" />
28
+
29
+ <receiver
30
+ android:name="dev.poolse.callcore.android.MessageActionReceiver"
31
+ android:exported="false" />
32
+
33
+ <service
34
+ android:name="dev.poolse.callcore.android.CallForegroundService"
35
+ android:exported="false"
36
+ android:foregroundServiceType="phoneCall|microphone" />
37
+
38
+ <service
39
+ android:name="dev.poolse.callcore.android.CallMessagingService"
40
+ android:exported="false">
41
+ <intent-filter>
42
+ <action android:name="com.google.firebase.MESSAGING_EVENT" />
43
+ </intent-filter>
44
+ </service>
45
+ </application>
46
+ </manifest>