@takeoffmedia/react-native-penthera 0.4.8 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,7 @@ class ServiceStarter : VirtuosoServiceStarter() {
28
28
 
29
29
  // This is a helper class which is used in the demo for creating the notifications
30
30
  //Name notification channel
31
- private val notificationFactory: NotificationFactory = NotificationFactory("Britbox")
31
+ // private val notificationFactory: NotificationFactory = NotificationFactory("Britbox")
32
32
 
33
33
  /**
34
34
  * This method will be called by the framework to request the generation of a notification,
@@ -47,7 +47,7 @@ class ServiceStarter : VirtuosoServiceStarter() {
47
47
  */
48
48
  override fun getForegroundServiceNotification(context: Context?, forIntent: Intent?): Notification {
49
49
 
50
- val notification = notificationFactory.getNotification(context!!, forIntent)
50
+ val notification = ServiceForegroundNotificationProvider().notificationFactory.getNotification(context!!, forIntent)
51
51
  if (notification != null) {
52
52
  currentNotification = notification
53
53
  }
@@ -29,6 +29,8 @@ class ServiceForegroundNotificationProvider : IForegroundNotificationProvider{
29
29
  private var notificationChannel: NotificationChannel? = null
30
30
  private var channelId: String? = null
31
31
  private var currentNotification: Notification? = null
32
+ //Name notification channel
33
+ val notificationFactory: NotificationFactory = NotificationFactory("Britbox")
32
34
 
33
35
 
34
36
  /**
@@ -92,7 +94,7 @@ class ServiceForegroundNotificationProvider : IForegroundNotificationProvider{
92
94
  if (reasonIntent == null) return currentNotification!!
93
95
 
94
96
  //Name notification channel
95
- currentNotification = NotificationFactory("Britbox").getNotification(context!!, reasonIntent )
97
+ currentNotification = notificationFactory.getNotification(context!!, reasonIntent )
96
98
 
97
99
  return currentNotification!!
98
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeoffmedia/react-native-penthera",
3
- "version": "0.4.8",
3
+ "version": "0.5.0",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",