File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import messaging, {
33 FirebaseMessagingTypes ,
44} from "@react-native-firebase/messaging" ;
55import { Alert , PermissionsAndroid , Platform } from "react-native" ;
6- import { router } from "expo-router" ;
76import * as Device from "expo-device" ;
87import { NOTIFICATION_STRINGS } from "../constants/Notifications" ;
98
@@ -112,6 +111,19 @@ export const savePushToken = async (token: string): Promise<void> => {
112111 }
113112} ;
114113
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+
115127/**
116128 * DEPRACATED
117129 * DEPRACATED
You can’t perform that action at this time.
0 commit comments