Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can i display image on push notification? #255

Closed
thuynt99 opened this issue Jan 29, 2021 · 26 comments
Closed

Can i display image on push notification? #255

thuynt99 opened this issue Jan 29, 2021 · 26 comments

Comments

@thuynt99
Copy link

For ios:
- how can i display push when app in FG?

@sujitgawas19
Copy link

Hey.. did you figure out how to display image when the app is in foreground?
I am facing the same problem.

@thuynt99
Copy link
Author

thuynt99 commented Mar 5, 2021

@sujitgawas19 No, I can't show image in FG.
I am looking for solution!

@BunHouth
Copy link

BunHouth commented Mar 9, 2021

@sujitgawas19 No, I can't show image in FG.
I am looking for solution!

something like that?

rsz_1rsz_img_669eaa85be8a-1

@sujitgawas19
Copy link

sujitgawas19 commented Mar 9, 2021

@BunHouth Ya. How did you do that?
Was the app in foreground?

@BunHouth
Copy link

BunHouth commented Mar 9, 2021

@BunHouth Ya. How did you do that?
Was the app in foreground?

something like that?

This for local notification only.

ezgif.com-gif-maker.mov

@sujitgawas19
Copy link

@BunHouth Can you share the code to display the local push notifications?

@BunHouth
Copy link

BunHouth commented Mar 9, 2021

@BunHouth Can you share the code to display the local push notifications?

you can found example code here => https://github.com/aasatech/rn-push-notification-image
fork repo => https://github.com/aasatech/push-notification-ios#local-notification-image

happy coding :)

@sujitgawas19
Copy link

@BunHouth Great.
Why don't you create a PR for this?

@BunHouth
Copy link

BunHouth commented Mar 9, 2021

@BunHouth Great.
Why don't you create a PR for this?

I think that feature is optional.

@vuletuanbt
Copy link
Contributor

@BunHouth Great.
Why don't you create a PR for this?

I think that feature is optional.

Could you create PR for this feature ? I think more people need to see this

@BunHouth
Copy link

@BunHouth Great.
Why don't you create a PR for this?

I think that feature is optional.

Could you create PR for this feature ? I think more people need to see this

That feature is optional, because we just using it for local notification only.
You can using my fork repo or using patch package instead.

@vuletuan
Copy link
Contributor

Okie. I got it

@vuletuanbt
Copy link
Contributor

I created PR for this issue, please check it out #272

@thuynt99
Copy link
Author

@BunHouth Amazingly, I was able to show the picture while in FG. thank you very much!!!!!!!!

@ghostknow
Copy link

@BunHouth How can I show image with remote notification, thanks

@BunHouth
Copy link

BunHouth commented Apr 8, 2021

@BunHouth How can I show image with remote notification, thanks

for remote notification, please check this https://rnfirebase.io/messaging/ios-notification-images#step-1---add-a-notification-service-extension

@trungtin2222
Copy link

@BunHouth Amazingly, I was able to show the picture while in FG. thank you very much!!!!!!!!

Hi Thuy, can i have your code ? i tried but not work :(

@thuynt99
Copy link
Author

@trungtin2222 what version react native do you use???

@trungtin2222
Copy link

@trungtin2222 what version react native do you use???

I use [email protected]

@BunHouth
Copy link

@trungtin2222 what version react native do you use???

I use [email protected]

@trungtin2222 you can check this thread first

#255 (comment)

react-native-push-notification-ios is not support local image notification.

@trungtin2222
Copy link

@trungtin2222 what version react native do you use???

I use [email protected]

@trungtin2222 you can check this thread first

#255 (comment)

react-native-push-notification-ios is not support local image notification.

hi @BunHouth, i checked your comment, i was used your code but it's not work for me, i try to check AppDelegate.m but i don't have more information

@BunHouth
Copy link

@trungtin2222 what version react native do you use???

I use [email protected]

@trungtin2222 you can check this thread first
#255 (comment)
react-native-push-notification-ios is not support local image notification.

hi @BunHouth, i checked your comment, i was used your code but it's not work for me, i try to check AppDelegate.m but i don't have more information

if you want local notification work, you need to change your package.json
"@react-native-community/push-notification-ios": "^1.8.0" to
"@react-native-community/push-notification-ios": "aasatech/push-notification-ios",

@trungtin2222
Copy link

@trungtin2222 what version react native do you use???

I use [email protected]

@trungtin2222 you can check this thread first
#255 (comment)
react-native-push-notification-ios is not support local image notification.

hi @BunHouth, i checked your comment, i was used your code but it's not work for me, i try to check AppDelegate.m but i don't have more information

if you want local notification work, you need to change your package.json
"@react-native-community/push-notification-ios": "^1.8.0" to
"@react-native-community/push-notification-ios": "aasatech/push-notification-ios",

I think you should create PR for this feature, my app still not work with image, i think this issue happening on M1 devices :(

@trungtin2222
Copy link

it's work in intel devices, many thanks @BunHouth

@Naturalclar
Copy link
Collaborator

rich notification support with images has been added in v1.9.0 🎉

@danishsaleem0
Copy link

image not showing in background

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants