Skip to content

Commit e2d265c

Browse files
author
“Linh
committed
feat: implement incoming call style
- Implemented new style for incoming calls - Updated dependencies to the latest versions - Refactored notification service for improved performance - Upgraded example version to 0.74x - Upgraded Android target to API level 34 - Added new prop to BREAKING CHANGE: - Renamed type interfaces for consistency: - interface is now - interface is now - interface is now - interface is now - Event listeners for and events have been updated to use the new types. Ensure to update your implementation accordingly. Updated README with new usage examples and guidelines.
1 parent 32fe51e commit e2d265c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ import RNNotificationCall from 'react-native-full-screen-notification-incoming-c
104104
* @param timeout - Timeout duration in milliseconds (optional)
105105
* @param foregroundOptions - Options for the foreground notification
106106
*/
107-
function displayNotification(uid:string, avatar?:string, timeout?:number, foregroundOptions:foregroundOptionsModel):void
107+
function displayNotification(uid:string, avatar?:string, timeout?:number, foregroundOptions:ForegroundOptionsModel):void
108108
/**
109109
* Options for the foreground notification
110110
*/
111-
export interface foregroundOptionsModel {
111+
export interface ForegroundOptionsModel {
112112
/** Channel ID of the notification */
113113
channelId: string;
114114
/** Channel name of the notification */

src/index.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ enum RNNotificationEvent {
3434
}
3535
enum CallAction {
3636
ACTION_END_CALL = 'ACTION_END_CALL',
37+
/** Indicates the call was explicitly declined by the user, either by pressing the decline button or invoking the `declineCall` function. */
3738
ACTION_REJECTED_CALL = 'ACTION_REJECTED_CALL',
39+
/** Indicates the notification was automatically hidden due to a timeout. */
3840
ACTION_HIDE_CALL = 'ACTION_HIDE_CALL',
3941
ACTION_SHOW_INCOMING_CALL = 'ACTION_SHOW_INCOMING_CALL',
4042
HIDE_NOTIFICATION_INCOMING_CALL = 'HIDE_NOTIFICATION_INCOMING_CALL',
@@ -45,7 +47,7 @@ enum CallAction {
4547
/**
4648
* Options for the foreground notification
4749
*/
48-
export interface foregroundOptionsModel {
50+
export interface ForegroundOptionsModel {
4951
/** Channel ID of the notification */
5052
channelId: string;
5153
/** Channel name of the notification */
@@ -142,7 +144,7 @@ class RNNotificationCall {
142144
uuid: string,
143145
avatar: string | null,
144146
timeout: number | null,
145-
foregroundOptions: foregroundOptionsModel
147+
foregroundOptions: ForegroundOptionsModel
146148
) => {
147149
if (!isAndroid) return;
148150
RNNotificationIncomingCall.displayNotification(

0 commit comments

Comments
 (0)