Closed thessler27 closed 5 years ago
Thanks for the report! Yes, this is a known issue/behavior. The "user" listener is written from the JavaScript side, while the Flurry Push is on the Android native side. When app is gone, all JavaScript is not active. Hence when Message comes, we can only trigger Android platform, but not the inactive React Native.
The workaround is to put your handling in the Android Application class, MainApplication.java
. Then when Message comes, the native Android is active to handle it.
Thanks for the quick response! I've done this for android, but is there a workaround for iOS?
Based on your feedback, we will add an API (Android native) in FlurryModule
. When you need to handle from cold start as well, you can just pass your listener in withMessaging
method.
Let me check on the iOS side.
Thanks for looking into it. Really appreciate it 👍
@thessler27 In the next release, iOS will allow users to initialize Flurry Push natively in UIApplication
as well to fix the cold start issue. Thanks a lot for your feedback!
@poting-oath really appreciate you guys looking into this! thanks again.
@thessler27 We just released a new version 3.2.0 with the feature that allows optional user's native FlurryMarketingOptions
or FlurryMessagingListener
. Thanks a lot for your great feedback!
FlurryModule.Builder
will accept user's messaging options or listener as,
.withMessaging(true)
.withMessaging(true, myFlurryMarketingOptions)
.withMessaging(true, myFlurryMessagingListener)
When users provide their own options or listener, the JavaScript listener will be disabled.
For iOS, we also support Flurry Push initialization from AppDelegate to handle notifications from a cold start. Please refer to README for detailed instruction.
When entering the application from a push notification with the app killed, the
Flurry.addMessagingListener
doesn't trigger the push notification. Is there a way to get access to a push notification from coldstart?