Closed bennito254 closed 5 years ago
Hello!
Icon name should be set to NotificationConfig.icon as string representing icon name. Icon for the notification should be located in drawable or mipmap resource directory of the android app folder.
We have creates a simple demo project: https://github.com/voximplant/react-native-foreground-service-demo
Demo project contains notification icon (ic_notification.png) in drawable-..dpi folders, for example: https://github.com/voximplant/react-native-foreground-service-demo/tree/master/android/app/src/main/res/drawable-hdpi Icon name is set the following way:
const notificationConfig = {
id: 3456,
title: 'Foreground Service',
text: 'Foreground service is running',
icon: 'ic_notification',
priority: 0
};
See full source code here
Best regards, Yulia Grigorieva
Thank you sir!
Where do you add the execute background code?
How is the icon name supposed to be set?
Plus, I also second @agat from #issue 1. A simple screen with Start, Stop buttons will be fine to get everybody started. Thank you for the library.