File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
OneSignalSDK/onesignal/src/main/java/com/onesignal Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
package com.onesignal
2
2
3
-
4
3
import android.content.Context
5
4
import android.content.Intent
6
5
import com.amazon.device.messaging.ADMMessageHandlerJobBase
7
6
8
7
class ADMMessageHandlerJob : ADMMessageHandlerJobBase () {
9
8
10
9
override fun onMessage (context : Context ? , intent : Intent ? ) {
11
- val bundle = intent!! .extras
10
+ val bundle = intent? .extras
12
11
13
12
val processedResult = NotificationBundleProcessor .processBundleFromReceiver(context, bundle)
14
13
// TODO: Figure out the correct replacement or usage of completeWakefulIntent method
15
14
// FCMBroadcastReceiver.completeWakefulIntent(intent);
16
15
17
- // TODO: Figure out the correct replacement or usage of completeWakefulIntent method
18
- // FCMBroadcastReceiver.completeWakefulIntent(intent);
19
16
if (processedResult.processed()) return
20
17
21
18
val payload = NotificationBundleProcessor .bundleAsJSONObject(bundle)
22
19
val notification = OSNotification (payload)
23
20
24
- val notificationJob = OSNotificationGenerationJob (context)
25
- notificationJob.jsonPayload = payload
26
- notificationJob.context = context
27
- notificationJob.notification = notification
21
+ val notificationJob = OSNotificationGenerationJob (context).apply {
22
+ this .jsonPayload = payload
23
+ this .context = context
24
+ this .notification = notification
25
+ }
26
+
28
27
NotificationBundleProcessor .processJobForDisplay(notificationJob, true )
29
28
}
30
29
You can’t perform that action at this time.
0 commit comments