Flutter Bridge 1.7.0

Updated Android and iOS Apps Panel SDKs to 5.7.0

Push Permission Request

  • Deprecated Future<void> AppsPanel.requestPushPermisssion()
  • Added Future<bool> AppsPanel.requestPushPermissionWithResult() which returns whether the permission was granted or not

⚠️ Breaking changes ⚠️

  • The MainActivity of the android app needs to extend a ComponentActivity, this is usually done through extending FlutterFragmentActivity
    • This is because the new requestPushPermissionWithResult() requires a ComponentActivity
    • Not doing this will lead to a crash at runtime when calling this function

Datadog log module

  • Added functions in AppsPanel.logManager to add and remove tags

Interstitial

  • Added AppsPanel.interstitialManager with a .showInterstitial() function to manually show an interstitial

Various updates

  • flutter 3.19.3 -> 3.41.2 (This doesn't change the minimum required version to use the package)
  • flutter_lints ^2.0.1 -> ^6.0.0
  • Gradle 7.4 -> 8.14.4
  • AGP 7.3.1 -> 8.13.0
  • Kotlin 1.7.20 -> 2.3.10

Push Notifications Clicked Data

  • A new pushClickedDataStream has been added in AppsPanel.pushManager, it will emit a Map<String, dynamic> every time a notification without a url_redirect is clicked while the app is in the foreground
  • On android the setup is automatic, however on iOS you need to add a few lines in the AppDelegate
    • First you need to instantiate and store inside the AppDelegate an instance of PushManager
    pushManager = PushManager(appDelegate: self)
    • You need to add this override in the AppDeleate
    override func userNotificationCenter(
      _ center: UNUserNotificationCenter,
      didReceive response: UNNotificationResponse,
      withCompletionHandler completionHandler: @escaping () -> Void
    ) {
      	if response.notification.request.content.userInfo["url_redirect"] == nil {
          	pushManager?.addPushClickedData(response.notification.request.content.userInfo)
        }
    }	

Remote Configuration

  • AppsPanel.apRemoteConfigurationStream and AppsPanel.remoteConfiguration have been added to retrieve the remote configuration of the SDK (and potential parameters)

Misc

  • A x-ap-bridgeversion header has been added to all API and SDK requests, with the version of the bridge