The plugin implements ApptentiveActivityInfo and registers ActivityInfoCallback. However, if the main flutter activity is backgrounded, Apptentive SDK loses it's reference because of WeakReference. After the FlutterActivity comes to foreground there is no lifecycle method available at the plugin level to call the registerApptentiveActivityInfoCallback. Implementing lifecycle observers like Application.ActivityLifecycleCallbacks partly fixes the issue but introduce other bugs. So the proposed solution is the MainActivity should inherit FlutterFragmentActivity and implement ApptentiveActivityInfo and call registerApptentiveActivityInfoCallback o onResume.
Updated the onMethodCall to register registerApptentiveActivityInfoCallback
Hidden messages & files not supported. They weren't supported in legacy & new iOS SDK as well. We can wait until there is an ask.
Survey listener, new message listener is tested
Push notification
Verified with firebase push notification using FoxFacts. Notification is received when app is in the background. I didn't add any action to the notification like opening the message center. Also, I haven't added support if the app is in the terminated state.
I wasn't able to test the Urban Airship.
Custom data is supported and tested.
Can show interaction & can show message center is supported & verified through FoxFacts
distributionVersion need to be hardcoded. BothdistributionVersion & distributionName is supported.
Tested the example & FoxFacts app with Bridge theme & Material theme. Other AppCompat won't work.
registerApptentiveActivityInfoCallback
. Implementing lifecycle observers likeApplication.ActivityLifecycleCallbacks
partly fixes the issue but introduce other bugs.So the proposed solution is the.MainActivity
should inheritFlutterFragmentActivity
and implementApptentiveActivityInfo
and callregisterApptentiveActivityInfoCallback
oonResume
onMethodCall
to registerregisterApptentiveActivityInfoCallback
distributionVersion
need to be hardcoded. BothdistributionVersion
&distributionName
is supported.