katzer / cordova-plugin-local-notifications

Cordova Local-Notification Plugin
Apache License 2.0
2.56k stars 1.75k forks source link

Not Receiving attachment in background. Only receiving it when app is running in background. #1910

Open codehack26 opened 4 years ago

codehack26 commented 4 years ago

WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!

Provide a general summary of the issue.

Your Environment

Expected Behavior

Not Receiving attachment in background. Only receiving it when the app is running in the background

Actual Behavior

Should able to receive the attachment in the background when the app is closed.

Code

showNotificationWithImage(title:string,text:string,image:string){ this.notification.schedule({ id:1, title:title, text:text, attachments: ["https://cdn.craftbeer.com/wp-content/uploads/coffee2_hero.jpg"] vibrate:true, foreground: true, color:'#064ea2', smallIcon:'res://notification_icon', }); }

Fever905 commented 11 months ago

I noticed on iOS the attachment image does not come through.. I haven't tried it when the app is running in background. The GPS function does work to trigger it, but no image is showing up.