File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import messaging, {
3
3
FirebaseMessagingTypes ,
4
4
} from "@react-native-firebase/messaging" ;
5
5
import { Alert , PermissionsAndroid , Platform } from "react-native" ;
6
- import { router } from "expo-router" ;
7
6
import * as Device from "expo-device" ;
8
7
import { NOTIFICATION_STRINGS } from "../constants/Notifications" ;
9
8
@@ -112,6 +111,19 @@ export const savePushToken = async (token: string): Promise<void> => {
112
111
}
113
112
} ;
114
113
114
+ // Example function to trigger a local notification
115
+ export async function triggerLocalSampleNotification ( ) {
116
+ await Notifications . scheduleNotificationAsync ( {
117
+ content : {
118
+ title : "Job Notification" ,
119
+ body : "This is a test notification." ,
120
+ sound : true ,
121
+ data : { extraData : "Some data" } ,
122
+ } ,
123
+ trigger : null , // Send immediately
124
+ } ) ;
125
+ }
126
+
115
127
/**
116
128
* DEPRACATED
117
129
* DEPRACATED
You can’t perform that action at this time.
0 commit comments