react-native-push-notification icon indicating copy to clipboard operation
react-native-push-notification copied to clipboard

Scheduled notification is not coming android

Open AjayGol opened this issue 2 years ago • 1 comments

Bug

<-- This is my code.

function pushNotif(){ PushNotification.createChannel( { channelId: "specialid", // (required) channelName: "Special messasge", // (required) channelDescription: "Notification for special message", // (optional) default: undefined. importance: 4, // (optional) default: 4. Int value of the Android notification importance vibrate: true, // (optional) default: true. Creates the default vibration patten if true. }, (created) => console.log(createChannel returned '${created}') // (optional) callback returns whether the channel was created, false means it already existed. );

PushNotification.localNotificationSchedule({ channelId:'specialid', //his must be same with channelid in createchannel title:'hello', message:'test message' }) }

index.js -->>

PushNotification.configure({ onRegister: function (token) { console.log('TOKEN:', token); },

// (required) Called when a remote is received or opened, or local notification is opened onNotification: function (notification) { console.log('NOTIFICATION:', notification);

// process the notification

// (required) Called when a remote is received or opened, or local notification is opened
notification.finish(PushNotificationIOS.FetchResult.NoData);

},

// (optional) Called when Registered Action is pressed and invokeApp is false, if true onNotification will be called (Android) onAction: function (notification) { console.log('ACTION:', notification.action); console.log('NOTIFICATION:', notification);

// process the action

},

// (optional) Called when the user fails to register for remote notifications. Typically occurs when APNS is having issues, or the device is a simulator. (iOS) onRegistrationError: function (err) { console.error(err.message, err); },

// IOS ONLY (optional): default: all - Permissions to register. permissions: { alert: true, badge: true, sound: true, },

// Should the initial notification be popped automatically // default: true popInitialNotification: true,

/**

  • (optional) default: true
    • Specified if permissions (ios) and token (android and ios) will requested or not,
    • if not, you must call PushNotificationsHandler.requestPermissions() later
    • if you are not using remote notification or do not have Firebase installed, use this:
  • requestPermissions: Platform.OS === 'ios'
    

*/ requestPermissions: false, });

<--

-->** not coming notification in android **

Please give me answer

react native version: 0.72.4 android : 12

AjayGol avatar Oct 06 '23 07:10 AjayGol

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Oct 06 '24 00:10 github-actions[bot]