@robono/calling-react-native 0.5.0 → 0.6.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 (32) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/INCOMING-CALLS.md +68 -0
  3. package/README.md +8 -2
  4. package/RobonoCallingRuntime.podspec +1 -1
  5. package/SBOM.spdx.json +654 -366
  6. package/android/build.gradle +1 -0
  7. package/android/consumer-rules.pro +9 -0
  8. package/android/src/main/AndroidManifest.xml +9 -0
  9. package/android/src/main/java/com/robono/calling/CallingPackage.java +1 -1
  10. package/android/src/main/java/com/robono/calling/CallingRuntime.java +2 -2
  11. package/android/src/main/java/com/robono/calling/SystemCallActionReceiver.java +5 -0
  12. package/android/src/main/java/com/robono/calling/SystemCallActivity.java +25 -0
  13. package/android/src/main/java/com/robono/calling/SystemCallConnectionService.java +17 -0
  14. package/android/src/main/java/com/robono/calling/SystemCallMessagingService.java +19 -0
  15. package/android/src/main/java/com/robono/calling/SystemCallService.java +28 -0
  16. package/android/src/main/java/com/robono/calling/SystemCalling.java +95 -0
  17. package/app.plugin.cjs +11 -0
  18. package/dist/messenger.d.ts +1 -0
  19. package/dist/messenger.js +2 -0
  20. package/dist/native.d.ts +6 -0
  21. package/dist/native.js +35 -3
  22. package/dist/runtime.d.ts +1 -1
  23. package/dist/runtime.js +2 -2
  24. package/dist/system-calling.d.ts +29 -0
  25. package/dist/system-calling.js +184 -0
  26. package/dist/versions.d.ts +1 -1
  27. package/dist/versions.js +1 -1
  28. package/ios/RobonoCallingRuntime.m +2 -1
  29. package/ios/RobonoSystemCalling.h +7 -0
  30. package/ios/RobonoSystemCalling.m +176 -0
  31. package/package.json +6 -1
  32. package/plugin/incoming-calls.cjs +14 -0
package/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## 0.5.0 — unreleased
1
+ ## 0.6.0
2
+
3
+ Add account-scoped iPhone CallKit/PushKit and Android Telecom incoming calls, explicit Answer/Decline, current-call authorization, cancellation/expiry, and native audio ownership. Expo setup preserves normal message notifications. Native rebuild required; see INCOMING-CALLS.md.
4
+
5
+ ## 0.5.0 — 2026-11-04
2
6
 
3
7
  Add the shared Messenger calling manager for account-scoped direct/group controllers, cleanup, idle renewal, notification opening and unanswered-call prompts. Accept provider string sequence values without changing call authorization.
4
8
 
@@ -0,0 +1,68 @@
1
+ # Incoming calls in the supplied Messenger
2
+
3
+ The standard Expo Messenger connects system incoming calls automatically. Use the
4
+ Robono installer, keep `CustomerMessenger` mounted in the signed-in application,
5
+ and connect the app's Apple/Google credentials in Robono's notification setup.
6
+ Your customers use their existing login. Their sign-in provider and your server
7
+ remain the authority for their identity and account suspension.
8
+
9
+ ## Required setup
10
+
11
+ - iPhone: your Apple Developer Team ID, APNs Key ID, private `.p8` key and app
12
+ Bundle ID. Enable Push Notifications for that app. The key must permit the
13
+ app's VoIP topic (`your.bundle.id.voip`) as well as its normal message topic.
14
+ Use the APNs development environment for development builds, production for
15
+ TestFlight/App Store. Keep the private key at Robono, never in your app.
16
+ - Android: your existing Firebase project, the app's `google-services.json`, and
17
+ a service account authorized to send FCM notifications. Keep its private key
18
+ at Robono. The installer preserves existing Expo message notifications.
19
+ - Rebuild both phone apps. Expo Go cannot load native incoming-call handling.
20
+ The plugin adds audio/VoIP background modes on iPhone and the Android call
21
+ services and permissions. Users still control microphone, camera and notification
22
+ permissions; installing the SDK cannot grant them.
23
+
24
+ No additional call server, push database, background login service or webhook
25
+ receiver is required. Decline works with a short-lived grant that can only refuse
26
+ that recipient's unanswered invitation. It cannot read messages, answer a call or
27
+ end a connected call. Answer restores the customer session and checks the current
28
+ call before starting media. Cancellation and expiry remove the invitation.
29
+ Messages and cancellation never use Apple's VoIP push channel.
30
+
31
+ ## Appearance and platform behavior
32
+
33
+ Apple controls its system calling interface and ringtone. Robono does not play a competing connection sound while Apple is answering. Android supplies call notifications
34
+ with Answer/Decline and an incoming-call screen when permitted. Your app's display
35
+ name and the contact names supplied to Messenger identify the call. A missing
36
+ cached contact name displays “Incoming call”; the push contains no contact profile.
37
+ Android’s incoming screen reuses the saved calling colors and button labels from Features & preview. Apple controls the language and layout of its system screen. The connected call uses the supplied Messenger call screen and feature choices.
38
+ Calls answered elsewhere close the other devices' invitations.
39
+
40
+ Do Not Disturb, force-stop, notification settings and platform restrictions still
41
+ apply. Android full-screen intents require the user's permission and Google Play
42
+ eligibility for calling apps; otherwise the call notification offers the controls.
43
+ Voice can continue with the screen locked. Video requires an unlocked foreground
44
+ app and camera permission. Keep camera capture off when the app is not visible.
45
+ Browser notifications remain browser notifications; a closed browser cannot act
46
+ as a native phone-call receiver.
47
+
48
+ ## Existing native calling systems
49
+
50
+ Use `incomingCalls: false` in the calling Expo plugin when your application already
51
+ owns system calling. The ordinary notification/custom-adapter APIs remain available.
52
+ Do not run two incoming-call coordinators for the same invitation.
53
+
54
+ For a bare React Native host, autolink the package, enable
55
+ `RobonoSystemCallingEnabled` and audio/voip/remote-notification background modes in
56
+ Info.plist, and forward `didReceiveRemoteNotification` to
57
+ `[RobonoSystemCalling receiveRemoteNotification:userInfo]` without removing your
58
+ existing notification handler. On Android enable manifest metadata
59
+ `com.robono.calling.SYSTEM_CALLING` and forward call data from your existing Firebase
60
+ service to `SystemCalling.receive(context, remoteMessage.getData())`; if it returns
61
+ false, continue your existing message handler. Expo users need none of this manual
62
+ forwarding: the supplied config plugin installs it.
63
+
64
+ Custom hosts can use `createNativeSystemCalling` from the `/system-calling` entry.
65
+ Configure it with the authenticated notification `accountScope`, connect each
66
+ controller with `attach`, pass `audio` to the native media adapter, and register
67
+ its notification fields with the normal device. Clear it before changing accounts.
68
+ Never construct account scopes from unverified notification contents.
package/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ > For the supplied Messenger, use its automatic account, calling and notification
2
+ > connection. [System incoming-call setup](INCOMING-CALLS.md) is included by the
3
+ > installer. The custom-controller examples below are for apps that intentionally
4
+ > keep their own calling or notification integration.
5
+
1
6
  # Robono mobile calling
2
7
 
3
8
  Optional React Native screens, sounds and audio adapters for direct and group voice and video calls within your app or across Robono Bridge. Each person stays in the app they use. Supply your own accounts and navigation, and choose your branding in the Calling workspace.
@@ -10,7 +15,8 @@ Choose the pieces you want:
10
15
  | Ready-made screens and controls | `CallingOverlay` with `createCallingController` |
11
16
  | A screen inside its own navigation | `CallingScreen` with controlled state and callbacks |
12
17
  | Mobile microphone and audio handling | `createNativeCallAdapters` from the separate `/native` entry point |
13
- | Incoming notification routing | `/expo-notifications` for Expo, or `/notification-router` with your existing push provider |
18
+ | System incoming calls in the supplied Messenger | Automatic `/system-calling` connection; see [required credentials](INCOMING-CALLS.md) |
19
+ | Custom incoming notification routing | `/expo-notifications` for Expo, or `/notification-router` with your existing push provider |
14
20
  | Background call lifetime | `/runtime` for Android ongoing-call service and iPhone audio interruptions |
15
21
  | Entries inside an existing conversation | `CallHistoryItem` with your chat bubble colors |
16
22
 
@@ -50,7 +56,7 @@ The package name `@robono/calling-react-native` and the `/app.plugin.js` and `/a
50
56
 
51
57
  These dependencies are optional peers. Apps using only the screens do not need Expo audio, notifications or WebRTC. Apps using their own calling client can keep their existing audio and notification adapters.
52
58
 
53
- On iPhone, configure `NSMicrophoneUsageDescription` with your app's explanation and the `audio` background mode for ongoing calls. On Android, declare `RECORD_AUDIO`, `MODIFY_AUDIO_SETTINGS`, and `INTERNET`; obtain notification permission on Android 13+. For Bluetooth audio on Android 12+, declare and obtain `BLUETOOTH_CONNECT` through your app's permission flow. The optional native runtime supplies Android’s microphone foreground service and its ongoing-call notification. It starts only after microphone permission, while the app is visible, when the user makes or answers a call. Locking the phone after answering keeps that service running. Tapping its notification returns to your app; End releases the call. The service does not restart a call after the app is terminated. On iPhone, the runtime observes audio interruptions and holds an established call when another call takes the microphone; it never installs CallKit. If your app already owns call lifetime, pass your existing adapter instead of starting a second service. Screens-only applications can disable native autolinking for this package in their React Native configuration.
59
+ On iPhone, configure `NSMicrophoneUsageDescription` with your app's explanation and the `audio` background mode for ongoing calls. On Android, declare `RECORD_AUDIO`, `MODIFY_AUDIO_SETTINGS`, and `INTERNET`; obtain notification permission on Android 13+. For Bluetooth audio on Android 12+, declare and obtain `BLUETOOTH_CONNECT` through your app's permission flow. The optional native runtime supplies Android’s microphone foreground service and its ongoing-call notification. It starts only after microphone permission and an explicit call action. Ordinary calls start from the visible app; the system-calling coordinator also permits an authenticated lock-screen Answer. Locking the phone after answering keeps that service running. Tapping its notification returns to your app; End releases the call. The service does not restart a call after the app is terminated. On iPhone, the runtime observes audio interruptions and holds an established call when another call takes the microphone; the separate system-calling coordinator supplies CallKit for the standard Messenger. See [incoming calls](INCOMING-CALLS.md). If your app already owns call lifetime, pass your existing adapter instead of starting a second service. Screens-only applications can disable native autolinking for this package in their React Native configuration.
54
60
 
55
61
  Unanswered calls stop after 30 seconds from call creation. The service records No answer for the caller and the history helper displays Missed call for the recipient. The client also stops ringing at the supplied deadline if a status request stalls. Answering does not restart the ringing deadline.
56
62
 
@@ -10,6 +10,6 @@ Pod::Spec.new do |s|
10
10
  s.source = { :git => 'https://github.com/IMLX16/robono-sdks.git', :tag => 'calling-v0.1.1' }
11
11
  s.platforms = { :ios => '15.1' }
12
12
  s.source_files = 'ios/*.{h,m}'
13
- s.frameworks = 'AVFAudio', 'UIKit', 'ReplayKit'
13
+ s.frameworks = 'AVFAudio', 'UIKit', 'ReplayKit', 'CallKit', 'PushKit'
14
14
  s.dependency 'React-Core'
15
15
  end