calcazar / react-native-push-notification-CE

The community edition of the push notification library (by Zo0r) for applications made with React Native
MIT License
52 stars 23 forks source link

Download icons from URLs #22

Open khrizt opened 6 years ago

khrizt commented 6 years ago

Hi,

I'm trying to do a PR to allow this case, sending the icons as URLs and download the images in the app to show the image as icon (large or small). I'm struggling a bit on how to do that because the RNPushNotificationListenerService starts a main thread runnable (to be able to get the ReactInstanceManager if I understood it correctly) therefore I can't run async tasks in the code. Other react libraries download the images in the FirebaseMessagingService because they don't use the main thread.

Anyone has any idea on how to do that? If I can I'll create a PR to support this.