Closed m1ga closed 3 years ago
still have to test it but I've updated this and core. Will run some tests later
was a bit scared first since the data messages didn't arrive...but I was just using the wrong notification channel :facepalm:
Looking good. With firebase-core, 9.3.2.GA and 10.0.0. Data and notification messages arrive.
Pretty cool! Any useful features / enhancements we could add?
Oh, and this change should be double checked (foreground / background):
Docs to the Android 12 breaking change are here: https://developer.android.com/about/versions/12/behavior-changes-12#notification-trampolines
I don't see any differences inside my app or in the way the push opens. There is just one line missing in the log when I click on a notification (the one with ----->
in before )
before:
ActivityTaskManager: START u0 {flg=0x24000000 cmp=com.miga.testfirebase/firebase.cloudmessaging.PushHandlerActivity (has extras)} from uid 10742
-----> ActivityTaskManager: startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { flg=0x24000000 cmp=com.miga.testfirebase/firebase.cloudmessaging.PushHandlerActivity (has extras) }
ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.miga.testfirebase cmp=com.miga.testfirebase/.Test_firebase_messagingActivity (has extras)} from uid 10742
ActivityTaskManager: Duplicate finish request for r=ActivityRecord{7e36b3d u0 com.miga.testfirebase/firebase.cloudmessaging.PushHandlerActivity t35747 f}}
TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.miga.testfirebase.Test_firebase_messagingActivity@8e9ce80
TiAPI : test_firebase_messaging 1.0 (Powered by Titanium 10.0.0.6a0cfa55f5)
ActivityTaskManager: Displayed com.miga.testfirebase/.Test_firebase_messagingActivity: +290ms
ActivityTaskManager: START u0 {cmp=com.miga.testfirebase/org.appcelerator.titanium.TiActivity (has extras)} from uid 10742
ActivityTaskManager: Displayed com.miga.testfirebase/org.appcelerator.titanium.TiActivity: +319ms
after this PR:
ActivityTaskManager: START u0 {flg=0x14000000 cmp=com.miga.testfirebase/firebase.cloudmessaging.PushHandlerActivity (has extras)} from uid 10742
ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.miga.testfirebase cmp=com.miga.testfirebase/.Test_firebase_messagingActivity (has extras)} from uid 10742
ActivityTaskManager: Duplicate finish request for r=ActivityRecord{c55ac97 u0 com.miga.testfirebase/firebase.cloudmessaging.PushHandlerActivity t35750 f}}
TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.miga.testfirebase.Test_firebase_messagingActivity@2a2527c
TiAPI : test_firebase_messaging 1.0 (Powered by Titanium 10.0.0.6a0cfa55f5)
ActivityTaskManager: Displayed com.miga.testfirebase/.Test_firebase_messagingActivity: +271ms
ActivityTaskManager: START u0 {cmp=com.miga.testfirebase/org.appcelerator.titanium.TiActivity (has extras)} from uid 10742
ActivityTaskManager: Displayed com.miga.testfirebase/org.appcelerator.titanium.TiActivity: +311ms
I still see the data in lastData and onMessage is called inside the Ti app.
Will have a look at the trampoline stuff at the weekend
@hansemannn If you didn't find any issues this one can be merged, too.
@m1ga Please release on Github, thx!
strings.xml
part from the README. It will conflict with the json file and shouldn't be set anymore