From 1628171c7729d477ff06a6c1aa7d9e071b9060d2 Mon Sep 17 00:00:00 2001 From: Jayden Date: Thu, 18 Apr 2024 15:57:58 +0800 Subject: [PATCH] Update sample codes for v2.8.1 --- CHANGELOG.md | 6 ++ .../android/app/build.gradle | 2 +- FireworkFlutterSDKSample/ios/Podfile.lock | 44 +++++----- .../ios/Runner.xcodeproj/project.pbxproj | 8 +- .../lib/extensions/fw_events_extensions.dart | 2 + .../lib/generated/intl/messages_en.dart | 12 ++- .../lib/generated/l10n.dart | 11 +++ FireworkFlutterSDKSample/lib/l10n/intl_en.arb | 3 +- .../story_block_configuration_screen.dart | 19 ++--- .../lib/screens/home/home_screen.dart | 80 ++++++++++++++++--- .../link_content/link_content_screen.dart | 35 ++++++-- .../lib/screens/more/more_screen.dart | 2 +- .../lib/utils/fw_url_util.dart | 55 +++++++++++++ .../lib/utils/host_app_service.dart | 60 +++++++++++++- FireworkFlutterSDKSample/pubspec.lock | 4 +- FireworkFlutterSDKSample/pubspec.yaml | 2 +- docs/__404error.html | 2 +- .../AdBadgeConfiguration-class.html | 2 +- .../AdBadgeConfiguration.html | 2 +- .../AdBadgeConfiguration/androidFontInfo.html | 2 +- .../AdBadgeConfiguration/backgroundColor.html | 2 +- .../AdBadgeConfiguration/badgeTextType.html | 2 +- .../AdBadgeConfiguration/deepCopy.html | 2 +- .../AdBadgeConfiguration/textColor.html | 2 +- docs/fw_flutter_sdk/AdBadgeTextType.html | 2 +- .../AdBadgeTextType/AdBadgeTextType.html | 2 +- .../AdBadgeTextType/values-constant.html | 2 +- .../fw_flutter_sdk/AdConfiguration-class.html | 2 +- .../AdConfiguration/AdConfiguration.html | 2 +- .../AdConfiguration/adsFetchTimeout.html | 2 +- .../AdConfiguration/deepCopy.html | 2 +- .../AdConfiguration/requiresAds.html | 2 +- .../AdConfiguration/vastAttributes.html | 2 +- .../fw_flutter_sdk/AndroidFontInfo-class.html | 2 +- .../AndroidFontInfo/AndroidFontInfo.html | 2 +- .../AndroidFontInfo/deepCopy.html | 2 +- .../AndroidFontInfo/hashCode.html | 2 +- .../AndroidFontInfo/isCustom.html | 2 +- .../AndroidFontInfo/operator_equals.html | 2 +- .../AndroidFontInfo/typefaceName.html | 2 +- docs/fw_flutter_sdk/ButtonInfo-class.html | 2 +- .../fw_flutter_sdk/ButtonInfo/ButtonInfo.html | 2 +- docs/fw_flutter_sdk/ButtonInfo/deepCopy.html | 2 +- docs/fw_flutter_sdk/ButtonInfo/hashCode.html | 2 +- docs/fw_flutter_sdk/ButtonInfo/imageName.html | 2 +- .../ButtonInfo/operator_equals.html | 2 +- .../ButtonInfo/systemImageName.html | 2 +- docs/fw_flutter_sdk/ButtonInfo/tintColor.html | 2 +- .../CountdownTimerAppearanceMode.html | 2 +- .../CountdownTimerAppearanceMode.html | 2 +- .../values-constant.html | 2 +- .../CountdownTimerConfiguration-class.html | 2 +- .../CountdownTimerConfiguration.html | 2 +- .../appearance.html | 2 +- .../CountdownTimerConfiguration/deepCopy.html | 2 +- .../CountdownTimerConfiguration/hashCode.html | 2 +- .../CountdownTimerConfiguration/isHidden.html | 2 +- .../operator_equals.html | 2 +- .../CustomCTAClickCallback.html | 2 +- .../CustomCTAClickEvent-class.html | 2 +- .../CustomCTAClickEvent.html | 2 +- .../CustomCTAClickEvent/playerHandler.html | 2 +- .../CustomCTAClickEvent/url.html | 2 +- .../CustomCTAClickEvent/video.html | 2 +- .../CustomClickCartIconCallback.html | 2 +- .../CustomClickCartIconEvent-class.html | 2 +- .../CustomClickCartIconEvent.html | 2 +- .../CustomClickCartIconEvent/video.html | 2 +- .../CustomClickLinkButtonCallback.html | 2 +- .../CustomClickLinkButtonEvent-class.html | 2 +- .../CustomClickLinkButtonEvent.html | 2 +- .../CustomClickLinkButtonEvent/productId.html | 2 +- .../CustomClickLinkButtonEvent/unitId.html | 2 +- .../CustomClickLinkButtonEvent/url.html | 2 +- .../CustomClickLinkButtonEvent/video.html | 2 +- .../CustomTapProductCardCallback.html | 2 +- .../CustomTapProductCardEvent-class.html | 2 +- .../CustomTapProductCardEvent.html | 2 +- .../CustomTapProductCardEvent/productId.html | 2 +- .../CustomTapProductCardEvent/unitId.html | 2 +- .../CustomTapProductCardEvent/url.html | 2 +- .../CustomTapProductCardEvent/video.html | 2 +- docs/fw_flutter_sdk/FWError-class.html | 2 +- docs/fw_flutter_sdk/FWError/FWError.html | 2 +- docs/fw_flutter_sdk/FWError/name.html | 2 +- docs/fw_flutter_sdk/FWError/reason.html | 2 +- docs/fw_flutter_sdk/FWEvent-class.html | 2 +- docs/fw_flutter_sdk/FWEvent/FWEvent.html | 2 +- docs/fw_flutter_sdk/FWEvent/arguments.html | 2 +- docs/fw_flutter_sdk/FWEvent/eventName.html | 2 +- docs/fw_flutter_sdk/FWEventBus-class.html | 2 +- .../FWEventBus/FWEventBus.getInstance.html | 2 +- docs/fw_flutter_sdk/FWEventBus/fire.html | 2 +- docs/fw_flutter_sdk/FWEventBus/on.html | 2 +- docs/fw_flutter_sdk/FWNavigator-class.html | 2 +- .../FWNavigator/FWNavigator.getInstance.html | 2 +- .../FWNavigator/popNativeContainer.html | 2 +- .../FWNavigator/startFloatingPlayer.html | 2 +- .../FWNavigator/stopFloatingPlayer.html | 2 +- .../fw_flutter_sdk/FeedItemDetails-class.html | 2 +- .../FeedItemDetails/FeedItemDetails.html | 2 +- .../FeedItemDetails/channel.html | 2 +- .../FeedItemDetails/duration.html | 2 +- .../dynamicContentParameters.html | 2 +- .../FeedItemDetails/feedId.html | 2 +- .../hashtagFilterExpression.html | 2 +- docs/fw_flutter_sdk/FeedItemDetails/id.html | 2 +- .../fw_flutter_sdk/FeedItemDetails/index.html | 2 +- .../FeedItemDetails/playlist.html | 2 +- .../FeedItemDetails/playlistGroup.html | 2 +- .../FeedItemDetails/source.html | 2 +- .../fw_flutter_sdk/FeedItemDetails/title.html | 2 +- docs/fw_flutter_sdk/FireworkSDK-class.html | 2 +- .../FireworkSDK/FireworkSDK.getInstance.html | 2 +- .../FireworkSDK/adBadgeConfiguration.html | 2 +- .../FireworkSDK/appLanguage.html | 2 +- .../FireworkSDK/changeAppLanguage.html | 2 +- .../FireworkSDK/debugLogsEnabled.html | 2 +- docs/fw_flutter_sdk/FireworkSDK/init.html | 2 +- .../FireworkSDK/liveStream.html | 2 +- .../FireworkSDK/markInitCalled.html | 2 +- .../fw_flutter_sdk/FireworkSDK/navigator.html | 2 +- .../FireworkSDK/onCustomCTAClick.html | 2 +- .../fw_flutter_sdk/FireworkSDK/onSDKInit.html | 2 +- .../FireworkSDK/onVideoFeedClick.html | 2 +- .../FireworkSDK/onVideoPlayback.html | 2 +- .../FireworkSDK/openVideoPlayer.html | 2 +- .../FireworkSDK/shareBaseURL.html | 2 +- docs/fw_flutter_sdk/FireworkSDK/shopping.html | 2 +- .../FireworkSDK/trackPurchase.html | 2 +- .../FireworkSDK/videoLaunchBehavior.html | 2 +- .../GradientDrawable-class.html | 2 +- .../GradientDrawable/GradientDrawable.html | 2 +- .../GradientDrawable/colors.html | 2 +- .../GradientDrawable/deepCopy.html | 2 +- .../GradientDrawable/hashCode.html | 2 +- .../GradientDrawable/operator_equals.html | 2 +- .../GradientDrawable/orientation.html | 2 +- .../GradientDrawableOrientation.html | 2 +- .../GradientDrawableOrientation.html | 2 +- .../GradientDrawableOrientation/rawName.html | 2 +- .../values-constant.html | 2 +- docs/fw_flutter_sdk/IOSFontInfo-class.html | 2 +- .../IOSFontInfo/IOSFontInfo.html | 2 +- docs/fw_flutter_sdk/IOSFontInfo/deepCopy.html | 2 +- docs/fw_flutter_sdk/IOSFontInfo/fontName.html | 2 +- docs/fw_flutter_sdk/IOSFontInfo/hashCode.html | 2 +- .../IOSFontInfo/operator_equals.html | 2 +- .../IOSFontInfo/systemFontStyle.html | 2 +- .../IOSFontInfo/systemFontWeight.html | 2 +- docs/fw_flutter_sdk/IOSSystemFontStyle.html | 2 +- .../IOSSystemFontStyle.html | 2 +- .../IOSSystemFontStyle/values-constant.html | 2 +- docs/fw_flutter_sdk/IOSSystemFontWeight.html | 2 +- .../IOSSystemFontWeight.html | 2 +- .../IOSSystemFontWeight/values-constant.html | 2 +- .../LinkButtonConfiguration-class.html | 2 +- .../LinkButtonConfiguration.html | 2 +- .../LinkButtonConfiguration/deepCopy.html | 2 +- .../LinkButtonConfiguration/isHidden.html | 2 +- docs/fw_flutter_sdk/LiveStream-class.html | 2 +- .../LiveStream/LiveStream.getInstance.html | 2 +- .../LiveStream/onLiveStreamChatEvent.html | 2 +- .../LiveStream/onLiveStreamEvent.html | 2 +- .../LiveStreamChatEvent-class.html | 2 +- .../LiveStreamChatEvent.html | 2 +- .../LiveStreamChatEvent/eventName.html | 2 +- .../LiveStreamChatEvent/liveStream.html | 2 +- .../LiveStreamChatEvent/message.html | 2 +- .../LiveStreamChatEventName.html | 2 +- .../LiveStreamChatEventName.html | 2 +- .../values-constant.html | 2 +- .../fw_flutter_sdk/LiveStreamEvent-class.html | 2 +- .../LiveStreamEvent/LiveStreamEvent.html | 2 +- .../LiveStreamEvent/eventName.html | 2 +- docs/fw_flutter_sdk/LiveStreamEvent/info.html | 2 +- .../LiveStreamEventDetails-class.html | 2 +- .../LiveStreamEventDetails.html | 2 +- .../LiveStreamEventDetails/id.html | 2 +- docs/fw_flutter_sdk/LiveStreamEventName.html | 2 +- .../LiveStreamEventName.html | 2 +- .../LiveStreamEventName/values-constant.html | 2 +- .../LiveStreamMessageDetails-class.html | 2 +- .../LiveStreamMessageDetails.html | 2 +- .../LiveStreamMessageDetails/messageId.html | 2 +- .../LiveStreamMessageDetails/text.html | 2 +- .../LiveStreamMessageDetails/username.html | 2 +- .../OnLiveStreamChatEventCallback.html | 2 +- .../OnLiveStreamEventCallback.html | 2 +- .../OpenVideoPlayerConfiguration-class.html | 2 +- .../OpenVideoPlayerConfiguration.html | 2 +- ...Configuration.withPlayerConfiguration.html | 2 +- .../deepCopy.html | 2 +- .../enablePictureInPicture.html | 2 +- .../hashCode.html | 2 +- .../operator_equals.html | 2 +- docs/fw_flutter_sdk/PlayerHandler-class.html | 2 +- .../PlayerHandler/PlayerHandler.html | 2 +- docs/fw_flutter_sdk/PlayerHandler/pause.html | 2 +- docs/fw_flutter_sdk/PlayerHandler/resume.html | 2 +- docs/fw_flutter_sdk/Product-class.html | 2 +- docs/fw_flutter_sdk/Product/Product.html | 2 +- docs/fw_flutter_sdk/Product/description.html | 2 +- docs/fw_flutter_sdk/Product/isAvailable.html | 2 +- docs/fw_flutter_sdk/Product/name.html | 2 +- docs/fw_flutter_sdk/Product/productId.html | 2 +- docs/fw_flutter_sdk/Product/units.html | 2 +- .../ProductCardCTAButtonStyle-class.html | 2 +- .../ProductCardCTAButtonStyle.html | 2 +- .../ProductCardCTAButtonStyle/deepCopy.html | 2 +- .../ProductCardCTAButtonStyle/fontSize.html | 2 +- .../iOSFontInfo.html | 2 +- .../ProductCardCTAButtonStyle/textColor.html | 2 +- .../ProductCardCTAButtonText.html | 2 +- .../ProductCardCTAButtonText.html | 2 +- .../values-constant.html | 2 +- .../ProductCardConfiguration-class.html | 2 +- .../ProductCardConfiguration.html | 2 +- .../backgroundColor.html | 2 +- .../cornerRadius.html | 2 +- .../ctaButtonStyle.html | 2 +- .../ctaButtonText.html | 2 +- .../ProductCardConfiguration/deepCopy.html | 2 +- .../ProductCardConfiguration/height.html | 2 +- .../iconConfiguration.html | 2 +- .../isCtaButtonHidden.html | 2 +- .../ProductCardConfiguration/nameLabel.html | 2 +- .../priceConfiguration.html | 2 +- .../ProductCardConfiguration/theme.html | 2 +- .../ProductCardConfiguration/width.html | 2 +- .../ProductCardIconConfiguration-class.html | 2 +- .../ProductCardIconConfiguration.html | 2 +- .../cornerRadius.html | 2 +- .../deepCopy.html | 2 +- .../ProductCardLabelConfiguration-class.html | 2 +- .../ProductCardLabelConfiguration.html | 2 +- .../deepCopy.html | 2 +- .../fontSize.html | 2 +- .../iOSFontInfo.html | 2 +- .../numberOfLines.html | 2 +- .../textColor.html | 2 +- .../ProductCardPriceConfiguration-class.html | 2 +- .../ProductCardPriceConfiguration.html | 2 +- .../ProductCardPriceConfiguration/axis.html | 2 +- .../deepCopy.html | 2 +- .../isHidden.html | 2 +- .../isPriceFirst.html | 2 +- .../originalPriceLabel.html | 2 +- .../priceLabel.html | 2 +- .../ProductCardPriceLabelAxis.html | 2 +- .../ProductCardPriceLabelAxis.html | 2 +- .../values-constant.html | 2 +- docs/fw_flutter_sdk/ProductCardTheme.html | 2 +- .../ProductCardTheme/ProductCardTheme.html | 2 +- .../ProductCardTheme/values-constant.html | 2 +- .../ProductInfoViewConfiguration-class.html | 2 +- .../ProductInfoViewConfiguration.html | 2 +- .../ctaButton.html | 2 +- .../deepCopy.html | 2 +- .../linkButton.html | 2 +- .../productCard.html | 2 +- docs/fw_flutter_sdk/ProductPrice-class.html | 2 +- .../ProductPrice/ProductPrice.html | 2 +- docs/fw_flutter_sdk/ProductPrice/amount.html | 2 +- .../ProductPrice/currencyCode.html | 2 +- docs/fw_flutter_sdk/ProductUnit-class.html | 2 +- .../ProductUnit/ProductUnit.html | 2 +- docs/fw_flutter_sdk/ProductUnit/imageUrl.html | 2 +- .../ProductUnit/isAvailable.html | 2 +- docs/fw_flutter_sdk/ProductUnit/name.html | 2 +- docs/fw_flutter_sdk/ProductUnit/options.html | 2 +- docs/fw_flutter_sdk/ProductUnit/price.html | 2 +- docs/fw_flutter_sdk/ProductUnit/unitId.html | 2 +- docs/fw_flutter_sdk/ProductUnit/url.html | 2 +- .../ProductUnitOption-class.html | 2 +- .../ProductUnitOption/ProductUnitOption.html | 2 +- .../ProductUnitOption/name.html | 2 +- .../ProductUnitOption/value.html | 2 +- .../ReplayBadgeConfiguration-class.html | 2 +- .../ReplayBadgeConfiguration.html | 2 +- .../ReplayBadgeConfiguration/deepCopy.html | 2 +- .../ReplayBadgeConfiguration/hashCode.html | 2 +- .../ReplayBadgeConfiguration/isHidden.html | 2 +- .../operator_equals.html | 2 +- docs/fw_flutter_sdk/SDKInitCallback.html | 2 +- docs/fw_flutter_sdk/SDKInitEvent-class.html | 2 +- .../SDKInitEvent/SDKInitEvent.html | 2 +- docs/fw_flutter_sdk/SDKInitEvent/error.html | 2 +- .../ShoppingCTAButtonConfiguration-class.html | 2 +- .../ShoppingCTAButtonConfiguration.html | 2 +- .../backgroundColor.html | 2 +- .../deepCopy.html | 2 +- .../fontSize.html | 2 +- .../iOSFontInfo.html | 2 +- .../ShoppingCTAButtonConfiguration/text.html | 2 +- .../textColor.html | 2 +- .../fw_flutter_sdk/ShoppingCTAButtonText.html | 2 +- .../ShoppingCTAButtonText.html | 2 +- .../values-constant.html | 2 +- docs/fw_flutter_sdk/ShoppingCTACallback.html | 2 +- .../ShoppingCTAEvent-class.html | 2 +- .../ShoppingCTAEvent/ShoppingCTAEvent.html | 2 +- .../ShoppingCTAEvent/ctaHandler.html | 2 +- .../ShoppingCTAEvent/productId.html | 2 +- .../ShoppingCTAEvent/unitId.html | 2 +- docs/fw_flutter_sdk/ShoppingCTAEvent/url.html | 2 +- .../ShoppingCTAEvent/video.html | 2 +- .../ShoppingCTAHandler-class.html | 2 +- .../ShoppingCTAHandler.html | 2 +- .../ShoppingCTAHandler/complete.html | 2 +- .../ShoppingCTAHandler/showLoader.html | 2 +- docs/fw_flutter_sdk/ShoppingCTARes.html | 2 +- .../ShoppingCTARes/ShoppingCTARes.html | 2 +- .../ShoppingCTARes/values-constant.html | 2 +- .../ShoppingCTAResult-class.html | 2 +- .../ShoppingCTAResult/ShoppingCTAResult.html | 2 +- .../fw_flutter_sdk/ShoppingCTAResult/res.html | 2 +- .../ShoppingCTAResult/tips.html | 2 +- docs/fw_flutter_sdk/StoryBlock-class.html | 2 +- .../fw_flutter_sdk/StoryBlock/StoryBlock.html | 2 +- .../StoryBlock/adConfiguration.html | 2 +- docs/fw_flutter_sdk/StoryBlock/channel.html | 2 +- docs/fw_flutter_sdk/StoryBlock/contentId.html | 2 +- .../StoryBlock/cornerRadius.html | 2 +- .../StoryBlock/createState.html | 2 +- .../StoryBlock/dynamicContentParameters.html | 2 +- .../StoryBlock/enablePictureInPicture.html | 2 +- .../StoryBlock/hashtagFilterExpression.html | 2 +- docs/fw_flutter_sdk/StoryBlock/height.html | 2 +- .../StoryBlock/onStoryBlockCreated.html | 2 +- .../onStoryBlockDidStartPictureInPicture.html | 2 +- .../onStoryBlockDidStopPictureInPicture.html | 2 +- .../StoryBlock/onStoryBlockEmpty.html | 2 +- .../StoryBlock/onStoryBlockGetFeedId.html | 2 +- .../StoryBlock/onStoryBlockLoadFinished.html | 2 +- docs/fw_flutter_sdk/StoryBlock/playlist.html | 2 +- .../fw_flutter_sdk/StoryBlock/productIds.html | 2 +- docs/fw_flutter_sdk/StoryBlock/source.html | 2 +- .../StoryBlock/storyBlockConfiguration.html | 2 +- .../StoryBlock/wantKeepAlive.html | 2 +- docs/fw_flutter_sdk/StoryBlock/width.html | 2 +- .../StoryBlockConfiguration-class.html | 3 +- .../StoryBlockConfiguration.html | 2 +- .../buttonConfiguration.html | 2 +- .../countdownTimerConfiguration.html | 2 +- .../ctaButtonStyle.html | 2 +- .../StoryBlockConfiguration/ctaDelay.html | 2 +- .../ctaHighlightDelay.html | 2 +- .../StoryBlockConfiguration/ctaWidth.html | 2 +- .../StoryBlockConfiguration/deepCopy.html | 2 +- .../StoryBlockConfiguration/hashCode.html | 2 +- .../operator_equals.html | 2 +- .../StoryBlockConfiguration/playerStyle.html | 2 +- .../replayBadgeConfiguration.html | 2 +- .../StoryBlockConfiguration/shareBaseURL.html | 2 +- .../StoryBlockConfiguration/showBranding.html | 2 +- .../showMuteButton.html | 2 +- .../showPlaybackButton.html | 5 +- .../showShareButton.html | 2 +- .../showVideoDetailTitle.html | 2 +- .../videoCompleteAction.html | 2 +- .../videoPlayerLogoConfiguration.html | 2 +- .../StoryBlockController-class.html | 2 +- .../StoryBlockController.html | 2 +- .../StoryBlockController/handler.html | 2 +- .../StoryBlockController/openFullscreen.html | 2 +- .../StoryBlockController/pause.html | 2 +- .../StoryBlockController/play.html | 2 +- .../StoryBlockCreatedCallback.html | 2 +- .../StoryBlockDidStartPictureInPicture.html | 2 +- .../StoryBlockDidStopPictureInPicture.html | 2 +- .../StoryBlockEmptyCallback.html | 2 +- .../StoryBlockGetFeedIdCallback.html | 2 +- .../StoryBlockLoadFinishedCallback.html | 2 +- docs/fw_flutter_sdk/StoryBlockSource.html | 2 +- .../StoryBlockSource/StoryBlockSource.html | 2 +- .../StoryBlockSource/values-constant.html | 2 +- .../TrackPurchaseParameters-class.html | 2 +- .../TrackPurchaseParameters.html | 2 +- .../additionalInfo.html | 2 +- .../TrackPurchaseParameters/countryCode.html | 2 +- .../TrackPurchaseParameters/currencyCode.html | 2 +- .../TrackPurchaseParameters/orderId.html | 2 +- .../TrackPurchaseParameters/value.html | 2 +- .../UpdateProductDetailsCallback.html | 2 +- .../UpdateProductDetailsEvent-class.html | 2 +- .../UpdateProductDetailsEvent.html | 2 +- .../UpdateProductDetailsEvent/productIds.html | 2 +- .../UpdateProductDetailsEvent/video.html | 2 +- docs/fw_flutter_sdk/VastAttribute-class.html | 2 +- .../VastAttribute/VastAttribute.html | 2 +- .../VastAttribute/deepCopy.html | 2 +- docs/fw_flutter_sdk/VastAttribute/name.html | 2 +- docs/fw_flutter_sdk/VastAttribute/value.html | 2 +- docs/fw_flutter_sdk/VideoFeed-class.html | 2 +- docs/fw_flutter_sdk/VideoFeed/VideoFeed.html | 2 +- .../VideoFeed/adConfiguration.html | 2 +- docs/fw_flutter_sdk/VideoFeed/channel.html | 2 +- docs/fw_flutter_sdk/VideoFeed/contentId.html | 2 +- .../fw_flutter_sdk/VideoFeed/createState.html | 2 +- .../VideoFeed/dynamicContentParameters.html | 2 +- .../VideoFeed/enablePictureInPicture.html | 2 +- .../VideoFeed/hashtagFilterExpression.html | 2 +- docs/fw_flutter_sdk/VideoFeed/height.html | 2 +- docs/fw_flutter_sdk/VideoFeed/mode.html | 2 +- .../VideoFeed/onVideoFeedCreated.html | 2 +- .../onVideoFeedDidStartPictureInPicture.html | 2 +- .../onVideoFeedDidStopPictureInPicture.html | 2 +- .../VideoFeed/onVideoFeedEmpty.html | 2 +- .../VideoFeed/onVideoFeedGetFeedId.html | 2 +- .../VideoFeed/onVideoFeedLoadFinished.html | 2 +- docs/fw_flutter_sdk/VideoFeed/playlist.html | 2 +- .../VideoFeed/playlistGroup.html | 2 +- docs/fw_flutter_sdk/VideoFeed/productIds.html | 2 +- docs/fw_flutter_sdk/VideoFeed/source.html | 2 +- .../VideoFeed/videoFeedConfiguration.html | 2 +- .../VideoFeed/videoPlayerConfiguration.html | 2 +- .../VideoFeed/wantKeepAlive.html | 2 +- docs/fw_flutter_sdk/VideoFeed/width.html | 2 +- .../VideoFeedClickCallback.html | 2 +- .../VideoFeedClickEvent-class.html | 2 +- .../VideoFeedClickEvent.html | 2 +- .../VideoFeedClickEvent/info.html | 2 +- .../VideoFeedConfiguration-class.html | 2 +- .../VideoFeedConfiguration.html | 2 +- .../VideoFeedConfiguration/aspectRatio.html | 2 +- .../backgroundColor.html | 2 +- .../contentPadding.html | 2 +- .../VideoFeedConfiguration/cornerRadius.html | 2 +- .../VideoFeedConfiguration/deepCopy.html | 2 +- .../enableAutoplay.html | 2 +- .../VideoFeedConfiguration/gridColumns.html | 2 +- .../VideoFeedConfiguration/hashCode.html | 2 +- .../VideoFeedConfiguration/itemSpacing.html | 2 +- .../operator_equals.html | 2 +- .../VideoFeedConfiguration/playIcon.html | 2 +- .../VideoFeedConfiguration/replayBadge.html | 2 +- .../VideoFeedConfiguration/shadow.html | 2 +- .../VideoFeedConfiguration/showAdBadge.html | 2 +- .../VideoFeedConfiguration/title.html | 2 +- .../VideoFeedConfiguration/titlePadding.html | 2 +- .../VideoFeedConfiguration/titlePosition.html | 2 +- .../VideoFeedController-class.html | 2 +- .../VideoFeedController.html | 2 +- .../VideoFeedController/handler.html | 2 +- .../VideoFeedController/refresh.html | 2 +- .../VideoFeedCreatedCallback.html | 2 +- ...oFeedDidStartPictureInPictureCallback.html | 2 +- ...eoFeedDidStopPictureInPictureCallback.html | 2 +- .../VideoFeedEmptyCallback.html | 2 +- .../VideoFeedGetFeedIdCallback.html | 2 +- .../VideoFeedLoadFinishedCallback.html | 2 +- docs/fw_flutter_sdk/VideoFeedMode.html | 2 +- .../VideoFeedMode/VideoFeedMode.html | 2 +- .../VideoFeedMode/values-constant.html | 2 +- .../VideoFeedPadding-class.html | 2 +- .../VideoFeedPadding/VideoFeedPadding.html | 2 +- .../VideoFeedPadding/bottom.html | 2 +- .../VideoFeedPadding/deepCopy.html | 2 +- .../VideoFeedPadding/hashCode.html | 2 +- .../fw_flutter_sdk/VideoFeedPadding/left.html | 2 +- .../VideoFeedPadding/operator_equals.html | 2 +- .../VideoFeedPadding/right.html | 2 +- docs/fw_flutter_sdk/VideoFeedPadding/top.html | 2 +- .../VideoFeedPlayIconConfiguration-class.html | 2 +- .../VideoFeedPlayIconConfiguration.html | 2 +- .../deepCopy.html | 2 +- .../hashCode.html | 2 +- .../hidden.html | 2 +- .../iconWidth.html | 2 +- .../operator_equals.html | 2 +- .../VideoFeedShadowConfiguration-class.html | 2 +- .../VideoFeedShadowConfiguration.html | 2 +- .../VideoFeedShadowConfiguration/color.html | 2 +- .../deepCopy.html | 2 +- .../hashCode.html | 2 +- .../VideoFeedShadowConfiguration/height.html | 2 +- .../VideoFeedShadowConfiguration/opacity.html | 2 +- .../operator_equals.html | 2 +- .../VideoFeedShadowConfiguration/width.html | 2 +- docs/fw_flutter_sdk/VideoFeedSource.html | 2 +- .../VideoFeedSource/VideoFeedSource.html | 2 +- .../VideoFeedSource/values-constant.html | 2 +- .../VideoFeedTitleConfiguration-class.html | 2 +- .../VideoFeedTitleConfiguration.html | 2 +- .../androidFontInfo.html | 2 +- .../VideoFeedTitleConfiguration/deepCopy.html | 2 +- .../VideoFeedTitleConfiguration/fontSize.html | 2 +- .../gradientDrawable.html | 2 +- .../VideoFeedTitleConfiguration/hashCode.html | 2 +- .../VideoFeedTitleConfiguration/hidden.html | 2 +- .../iOSFontInfo.html | 2 +- .../numberOfLines.html | 2 +- .../operator_equals.html | 2 +- .../textColor.html | 2 +- .../VideoFeedTitlePosition.html | 2 +- .../VideoFeedTitlePosition.html | 2 +- .../values-constant.html | 2 +- docs/fw_flutter_sdk/VideoFeedUtil-class.html | 2 +- .../VideoFeedUtil/VideoFeedUtil.html | 2 +- .../calculateGridFeedHeight.html | 2 +- docs/fw_flutter_sdk/VideoLaunchBehavior.html | 2 +- .../VideoLaunchBehavior.html | 2 +- .../VideoLaunchBehavior/values-constant.html | 2 +- .../fw_flutter_sdk/VideoPlaybackCallback.html | 2 +- .../VideoPlaybackDetails-class.html | 2 +- .../VideoPlaybackDetails.html | 2 +- .../VideoPlaybackDetails/badge.html | 2 +- .../VideoPlaybackDetails/caption.html | 2 +- .../VideoPlaybackDetails/ctaActionType.html | 2 +- .../VideoPlaybackDetails/ctaActionURL.html | 2 +- .../VideoPlaybackDetails/duration.html | 2 +- .../VideoPlaybackDetails/feedId.html | 2 +- .../VideoPlaybackDetails/hasCTA.html | 2 +- .../VideoPlaybackDetails/playerSize.html | 2 +- .../VideoPlaybackDetails/progress.html | 2 +- .../VideoPlaybackDetails/videoId.html | 2 +- .../VideoPlaybackEvent-class.html | 2 +- .../VideoPlaybackEvent.html | 2 +- .../VideoPlaybackEvent/eventName.html | 2 +- .../VideoPlaybackEvent/info.html | 2 +- .../VideoPlaybackEventName.html | 4 +- .../VideoPlaybackEventName.html | 2 +- .../VideoPlaybackEventName/rawName.html | 2 +- .../values-constant.html | 2 +- .../VideoPlayerButtonConfiguration-class.html | 2 +- .../VideoPlayerButtonConfiguration.html | 2 +- .../closeButton.html | 2 +- .../deepCopy.html | 2 +- .../hashCode.html | 2 +- .../muteButton.html | 2 +- .../operator_equals.html | 2 +- .../pauseButton.html | 2 +- .../playButton.html | 2 +- .../unmuteButton.html | 2 +- .../videoDetailButton.html | 2 +- .../VideoPlayerCTADelay-class.html | 2 +- .../VideoPlayerCTADelay.html | 2 +- .../VideoPlayerCTADelay/deepCopy.html | 2 +- .../VideoPlayerCTADelay/hashCode.html | 2 +- .../VideoPlayerCTADelay/operator_equals.html | 2 +- .../VideoPlayerCTADelay/type.html | 2 +- .../VideoPlayerCTADelay/value.html | 2 +- .../VideoPlayerCTADelayType.html | 2 +- .../VideoPlayerCTADelayType.html | 2 +- .../values-constant.html | 2 +- .../VideoPlayerCTAStyle-class.html | 2 +- .../VideoPlayerCTAStyle.html | 2 +- .../VideoPlayerCTAStyle/backgroundColor.html | 2 +- .../VideoPlayerCTAStyle/deepCopy.html | 2 +- .../VideoPlayerCTAStyle/fontSize.html | 2 +- .../VideoPlayerCTAStyle/hashCode.html | 2 +- .../VideoPlayerCTAStyle/iOSFontInfo.html | 2 +- .../VideoPlayerCTAStyle/operator_equals.html | 2 +- .../VideoPlayerCTAStyle/textColor.html | 2 +- docs/fw_flutter_sdk/VideoPlayerCTAWidth.html | 2 +- .../VideoPlayerCTAWidth.html | 2 +- .../VideoPlayerCTAWidth/values-constant.html | 2 +- .../VideoPlayerCompleteAction.html | 2 +- .../VideoPlayerCompleteAction.html | 2 +- .../values-constant.html | 2 +- .../VideoPlayerConfiguration-class.html | 2 +- .../VideoPlayerConfiguration.html | 2 +- .../buttonConfiguration.html | 2 +- .../countdownTimerConfiguration.html | 2 +- .../ctaButtonStyle.html | 2 +- .../VideoPlayerConfiguration/ctaDelay.html | 2 +- .../ctaHighlightDelay.html | 2 +- .../VideoPlayerConfiguration/ctaWidth.html | 2 +- .../VideoPlayerConfiguration/deepCopy.html | 2 +- .../VideoPlayerConfiguration/hashCode.html | 2 +- .../operator_equals.html | 2 +- .../VideoPlayerConfiguration/playerStyle.html | 2 +- .../replayBadgeConfiguration.html | 2 +- .../shareBaseURL.html | 2 +- .../showBranding.html | 2 +- .../showMuteButton.html | 2 +- .../showPlaybackButton.html | 2 +- .../showShareButton.html | 2 +- .../showVideoDetailTitle.html | 2 +- .../videoCompleteAction.html | 2 +- .../videoPlayerLogoConfiguration.html | 2 +- .../VideoPlayerLogoConfiguration-class.html | 2 +- .../VideoPlayerLogoConfiguration.html | 2 +- .../deepCopy.html | 2 +- .../encodedId.html | 2 +- .../hashCode.html | 2 +- .../isClickable.html | 2 +- .../operator_equals.html | 2 +- .../VideoPlayerLogoConfiguration/option.html | 2 +- .../fw_flutter_sdk/VideoPlayerLogoOption.html | 2 +- .../VideoPlayerLogoOption.html | 2 +- .../values-constant.html | 2 +- .../fw_flutter_sdk/VideoPlayerSize-class.html | 2 +- .../VideoPlayerSize/VideoPlayerSize.html | 2 +- .../VideoPlayerSize/height.html | 2 +- .../fw_flutter_sdk/VideoPlayerSize/width.html | 2 +- docs/fw_flutter_sdk/VideoPlayerStyle.html | 2 +- .../VideoPlayerStyle/VideoPlayerStyle.html | 2 +- .../VideoPlayerStyle/values-constant.html | 2 +- docs/fw_flutter_sdk/VideoShopping-class.html | 2 +- .../VideoShopping.getInstance.html | 2 +- .../VideoShopping/cartIconVisible.html | 2 +- .../VideoShopping/onCustomClickCartIcon.html | 2 +- .../onCustomClickLinkButton.html | 2 +- .../VideoShopping/onCustomTapProductCard.html | 2 +- .../VideoShopping/onShoppingCTA.html | 2 +- .../VideoShopping/onUpdateProductDetails.html | 2 +- .../productInfoViewConfiguration.html | 2 +- .../VideoShopping/setCartItemCount.html | 2 +- .../fw_flutter_sdk-library.html | 2 +- docs/index.html | 2 +- docs/index.json | 2 +- docs/search.html | 2 +- 614 files changed, 882 insertions(+), 665 deletions(-) create mode 100644 FireworkFlutterSDKSample/lib/utils/fw_url_util.dart diff --git a/CHANGELOG.md b/CHANGELOG.md index e765b2127..c9777a555 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## [2.8.1] + +### Fixed + +- [Android] [SingleTask Activity is launched in their own affinities](https://groups.google.com/g/ima-sdk/c/PfAnye3Hhww/m/08N6YyFsBAAJ), which is caused by [the Google IMA SDK v3.32.0](https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/history) + ## [2.8.0] ### Added diff --git a/FireworkFlutterSDKSample/android/app/build.gradle b/FireworkFlutterSDKSample/android/app/build.gradle index 6cbba09c5..bd0d3d682 100644 --- a/FireworkFlutterSDKSample/android/app/build.gradle +++ b/FireworkFlutterSDKSample/android/app/build.gradle @@ -53,7 +53,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 - versionName "2.8.0" + versionName "2.8.1" } compileOptions { diff --git a/FireworkFlutterSDKSample/ios/Podfile.lock b/FireworkFlutterSDKSample/ios/Podfile.lock index 02ced9acb..828bd0517 100644 --- a/FireworkFlutterSDKSample/ios/Podfile.lock +++ b/FireworkFlutterSDKSample/ios/Podfile.lock @@ -1,14 +1,14 @@ PODS: - AmazonIVSPlayer (1.8.3) - - FirebaseCore (10.23.0): + - FirebaseCore (10.24.0): - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.12) - GoogleUtilities/Logger (~> 7.12) - - FirebaseCoreExtension (10.23.0): + - FirebaseCoreExtension (10.24.0): - FirebaseCore (~> 10.0) - - FirebaseCoreInternal (10.23.0): + - FirebaseCoreInternal (10.24.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseCrashlytics (10.23.0): + - FirebaseCrashlytics (10.24.0): - FirebaseCore (~> 10.5) - FirebaseInstallations (~> 10.0) - FirebaseRemoteConfigInterop (~> 10.23) @@ -17,13 +17,13 @@ PODS: - GoogleUtilities/Environment (~> 7.8) - nanopb (< 2.30911.0, >= 2.30908.0) - PromisesObjC (~> 2.1) - - FirebaseInstallations (10.23.0): + - FirebaseInstallations (10.24.0): - FirebaseCore (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/UserDefaults (~> 7.8) - PromisesObjC (~> 2.1) - - FirebaseRemoteConfigInterop (10.23.0) - - FirebaseSessions (10.23.0): + - FirebaseRemoteConfigInterop (10.24.0) + - FirebaseSessions (10.24.0): - FirebaseCore (~> 10.5) - FirebaseCoreExtension (~> 10.0) - FirebaseInstallations (~> 10.0) @@ -31,17 +31,17 @@ PODS: - GoogleUtilities/Environment (~> 7.10) - nanopb (< 2.30911.0, >= 2.30908.0) - PromisesSwift (~> 2.1) - - FireworkVideo (1.20.1) + - FireworkVideo (1.20.2) - FireworkVideoIVSSupport (0.4.0): - AmazonIVSPlayer (~> 1.8.3) - FireworkVideoUI (0.1.0): - FireworkVideo - Flutter (1.0.0) - - FMDB (2.7.9): - - FMDB/standard (= 2.7.9) - - FMDB/standard (2.7.9) + - FMDB (2.7.10): + - FMDB/standard (= 2.7.10) + - FMDB/standard (2.7.10) - fw_flutter_sdk (1.0.0): - - FireworkVideo (= 1.20.1) + - FireworkVideo (= 1.20.2) - FireworkVideoUI (= 0.1.0) - Flutter - GoogleDataTransport (9.4.1): @@ -120,19 +120,19 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: AmazonIVSPlayer: ce792b427a4fe466d6ea32b3ce8abe391d9242d0 - FirebaseCore: 63efb128decaebb04c4033ed4e05fb0bb1cccef1 - FirebaseCoreExtension: cb88851781a24e031d1b58e0bd01eb1f46b044b5 - FirebaseCoreInternal: 6a292e6f0bece1243a737e81556e56e5e19282e3 - FirebaseCrashlytics: b7aca2d52dd2440257a13741d2909ad80745ac6c - FirebaseInstallations: 42d6ead4605d6eafb3b6683674e80e18eb6f2c35 - FirebaseRemoteConfigInterop: cbc87ffa4932719a7911a08e94510f18f026f5a7 - FirebaseSessions: f06853e30f99fe42aa511014d7ee6c8c319f08a3 - FireworkVideo: 138be8b4f5a4a8c57151e553cb2496ad7ea3925d + FirebaseCore: 11dc8a16dfb7c5e3c3f45ba0e191a33ac4f50894 + FirebaseCoreExtension: af5fd85e817ea9d19f9a2659a376cf9cf99f03c0 + FirebaseCoreInternal: bcb5acffd4ea05e12a783ecf835f2210ce3dc6af + FirebaseCrashlytics: af38ea4adfa606f6e63fcc22091b61e7938fcf66 + FirebaseInstallations: 8f581fca6478a50705d2bd2abd66d306e0f5736e + FirebaseRemoteConfigInterop: 6c349a466490aeace3ce9c091c86be1730711634 + FirebaseSessions: 2651b464e241c93fd44112f995d5ab663c970487 + FireworkVideo: 28bbdef4c9dabb06d454fab56d2e22ac7c26b54e FireworkVideoIVSSupport: c75d204e55afab922899e2ff90242a5ec6d4ad20 FireworkVideoUI: af83909d6d20c0d8158221cdd716c1c1f5afac8d Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - FMDB: aa44149f6fb634b1ac54f64f47064bb0d0c5a032 - fw_flutter_sdk: 6e7af165e798caf0136fcbfd79a2a9fe54e56575 + FMDB: eae540775bf7d0c87a5af926ae37af69effe5a19 + fw_flutter_sdk: b425498fbc092d898236f3f1863b2908f03f1a8b GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152 nanopb: 438bc412db1928dac798aa6fd75726007be04262 diff --git a/FireworkFlutterSDKSample/ios/Runner.xcodeproj/project.pbxproj b/FireworkFlutterSDKSample/ios/Runner.xcodeproj/project.pbxproj index 3a6ee6e78..373d2b722 100644 --- a/FireworkFlutterSDKSample/ios/Runner.xcodeproj/project.pbxproj +++ b/FireworkFlutterSDKSample/ios/Runner.xcodeproj/project.pbxproj @@ -439,7 +439,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.8.0; + MARKETING_VERSION = 2.8.1; PRODUCT_BUNDLE_IDENTIFIER = com.loopnow.fondor; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = fondor; @@ -521,7 +521,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.8.0; + MARKETING_VERSION = 2.8.1; PRODUCT_BUNDLE_IDENTIFIER = com.loopnow.fondor; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = fondor; @@ -658,7 +658,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.8.0; + MARKETING_VERSION = 2.8.1; PRODUCT_BUNDLE_IDENTIFIER = com.loopnow.fondor; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -687,7 +687,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.8.0; + MARKETING_VERSION = 2.8.1; PRODUCT_BUNDLE_IDENTIFIER = com.loopnow.fondor; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = fondor; diff --git a/FireworkFlutterSDKSample/lib/extensions/fw_events_extensions.dart b/FireworkFlutterSDKSample/lib/extensions/fw_events_extensions.dart index 28870fcb4..c8021e218 100644 --- a/FireworkFlutterSDKSample/lib/extensions/fw_events_extensions.dart +++ b/FireworkFlutterSDKSample/lib/extensions/fw_events_extensions.dart @@ -44,6 +44,7 @@ feedId: $feedId"""); extension VideoFeedClickEventExtension on VideoFeedClickEvent { void logMessage() { final id = info.id; + final feedId = info.feedId; final duration = info.duration; final index = info.index; final title = info.title; @@ -54,6 +55,7 @@ extension VideoFeedClickEventExtension on VideoFeedClickEvent { final dynamicContentParameters = info.dynamicContentParameters; FWExampleLoggerUtil.log("""onVideoFeedClick id: $id +feedId: $feedId duration: $duration index: $index title: $title diff --git a/FireworkFlutterSDKSample/lib/generated/intl/messages_en.dart b/FireworkFlutterSDKSample/lib/generated/intl/messages_en.dart index d7f8d0e14..104151dc1 100644 --- a/FireworkFlutterSDKSample/lib/generated/intl/messages_en.dart +++ b/FireworkFlutterSDKSample/lib/generated/intl/messages_en.dart @@ -32,9 +32,12 @@ class MessageLookup extends MessageLookupByLibrary { static String m5(min, max) => "Please enter height in [${min}, ${max}]"; - static String m6(url) => "The page url is ${url}."; + static String m6(url, iOSUrl, androidUrl) => + "The base url is ${url}.\nThe iOS url is ${iOSUrl}.\nThe Android url is ${androidUrl}."; - static String m7(min, max) => "Please enter width in [${min}, ${max}]"; + static String m7(url) => "The page url is ${url}."; + + static String m8(min, max) => "Please enter width in [${min}, ${max}]"; final messages = _notInlinedMessages(_notInlinedMessages); static Map _notInlinedMessages(_) => { @@ -223,6 +226,7 @@ class MessageLookup extends MessageLookupByLibrary { "loop": MessageLookupByLibrary.simpleMessage("loop"), "more": MessageLookupByLibrary.simpleMessage("More"), "multiFeeds": MessageLookupByLibrary.simpleMessage("Multi-feeds"), + "multiplePageUrlsToastText": m6, "muteOnFirstLaunch": MessageLookupByLibrary.simpleMessage("muteOnFirstLaunch"), "name": MessageLookupByLibrary.simpleMessage("Name"), @@ -238,7 +242,7 @@ class MessageLookup extends MessageLookupByLibrary { "Please enter grid columns in [1, 5]"), "open": MessageLookupByLibrary.simpleMessage("Open"), "openVideoURL": MessageLookupByLibrary.simpleMessage("Open Video URL"), - "pageUrlToastText": m6, + "pageUrlToastText": m7, "pause": MessageLookupByLibrary.simpleMessage("Pause"), "percentage": MessageLookupByLibrary.simpleMessage("percentage"), "play": MessageLookupByLibrary.simpleMessage("Play"), @@ -483,6 +487,6 @@ class MessageLookup extends MessageLookupByLibrary { MessageLookupByLibrary.simpleMessage("Video Launch Behavior"), "widthError": MessageLookupByLibrary.simpleMessage("Please enter correct width"), - "widthRangeError": m7 + "widthRangeError": m8 }; } diff --git a/FireworkFlutterSDKSample/lib/generated/l10n.dart b/FireworkFlutterSDKSample/lib/generated/l10n.dart index 666f4a90c..c60b1060e 100644 --- a/FireworkFlutterSDKSample/lib/generated/l10n.dart +++ b/FireworkFlutterSDKSample/lib/generated/l10n.dart @@ -2739,6 +2739,17 @@ class S { args: [url], ); } + + /// `The base url is {url}.\nThe iOS url is {iOSUrl}.\nThe Android url is {androidUrl}.` + String multiplePageUrlsToastText( + Object url, Object iOSUrl, Object androidUrl) { + return Intl.message( + 'The base url is $url.\nThe iOS url is $iOSUrl.\nThe Android url is $androidUrl.', + name: 'multiplePageUrlsToastText', + desc: '', + args: [url, iOSUrl, androidUrl], + ); + } } class AppLocalizationDelegate extends LocalizationsDelegate { diff --git a/FireworkFlutterSDKSample/lib/l10n/intl_en.arb b/FireworkFlutterSDKSample/lib/l10n/intl_en.arb index 973ea11fe..aa8b1eda7 100644 --- a/FireworkFlutterSDKSample/lib/l10n/intl_en.arb +++ b/FireworkFlutterSDKSample/lib/l10n/intl_en.arb @@ -267,5 +267,6 @@ "shadowHeightHint": "e.g. 0", "shadowHeightError": "Please enter correct shadow height", "shadowHeightRangeError": "Please enter shadow height in [0, 100]", - "pageUrlToastText": "The page url is {url}." + "pageUrlToastText": "The page url is {url}.", + "multiplePageUrlsToastText": "The base url is {url}.\nThe iOS url is {iOSUrl}.\nThe Android url is {androidUrl}." } diff --git a/FireworkFlutterSDKSample/lib/screens/configuration/story_block_configuration_screen.dart b/FireworkFlutterSDKSample/lib/screens/configuration/story_block_configuration_screen.dart index 79d818dec..b5d581982 100644 --- a/FireworkFlutterSDKSample/lib/screens/configuration/story_block_configuration_screen.dart +++ b/FireworkFlutterSDKSample/lib/screens/configuration/story_block_configuration_screen.dart @@ -144,20 +144,21 @@ class _StoryBlockConfigurationScreenState const SizedBox( height: 20, ), - if (defaultTargetPlatform == TargetPlatform.android) - Row( - children: [ - Expanded( - child: _buildMuteButtonShow(context), - ), + Row( + children: [ + Expanded( + child: _buildPlaybackButtonShow(context), + ), + if (defaultTargetPlatform == TargetPlatform.android) const SizedBox( width: 20, ), + if (defaultTargetPlatform == TargetPlatform.android) Expanded( - child: _buildPlaybackButtonShow(context), + child: _buildMuteButtonShow(context), ), - ], - ), + ], + ), const SizedBox( height: 20, ), diff --git a/FireworkFlutterSDKSample/lib/screens/home/home_screen.dart b/FireworkFlutterSDKSample/lib/screens/home/home_screen.dart index d32625099..9de6d01b7 100644 --- a/FireworkFlutterSDKSample/lib/screens/home/home_screen.dart +++ b/FireworkFlutterSDKSample/lib/screens/home/home_screen.dart @@ -5,6 +5,7 @@ import 'package:flutter/foundation.dart'; import 'package:fw_flutter_sdk/fw_flutter_sdk.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:fw_flutter_sdk_example/utils/host_app_service.dart'; import '../../extensions/fw_error_extension.dart'; import '../../generated/l10n.dart'; @@ -359,10 +360,25 @@ class _HomeScreenState extends State { List _buildMultiFeeds(BuildContext context) { List widgetList = []; + var storyBlockIndex = 0; + for (var e in _defaultHomeStoryBlockPlaylistInfoArray) { + storyBlockIndex++; + final title = "Story Block $storyBlockIndex"; FWExampleLoggerUtil.log( "_buildMultiFeeds channelId: ${e.channelId} playlistId: ${e.playlistId}"); widgetList.addAll([ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, + ), + child: Text( + title, + style: const TextStyle( + fontSize: 20, + ), + ), + ), const SizedBox( height: 20, ), @@ -380,6 +396,12 @@ class _HomeScreenState extends State { FWExampleLoggerUtil.log( "onStoryBlockEmpty error ${error?.displayString()}"); }, + onStoryBlockGetFeedId: (feedId) { + HostAppService.getInstance().widgetInfoMap[feedId] = WidgetInfo( + title: title, + type: "StoryBlock", + ); + }, ), ), const SizedBox( @@ -389,15 +411,52 @@ class _HomeScreenState extends State { const SizedBox( height: 20, ), - _buildListItemPlaceholder(context), - const SizedBox( - height: 20, - ), ]); } - + Map globalWidgetInfoMap = {}; + VideoFeed( + height: 220, + source: VideoFeedSource.playlist, + channel: "your encoded channel id", + playlist: "your encoded playlist id", + enablePictureInPicture: true, + onVideoFeedGetFeedId: (feedId) { + globalWidgetInfoMap[feedId] = WidgetInfo( + title: "VideoFeed 1", + type: "VideoFeed", + ); + }, + ); + StoryBlock( + cornerRadius: 20, + height: 400, + source: StoryBlockSource.playlist, + channel: "your encoded channel id", + playlist: "your encoded playlist id", + enablePictureInPicture: true, + onStoryBlockGetFeedId: (feedId) { + globalWidgetInfoMap[feedId] = WidgetInfo( + title: "StoryBlock 1", + type: "StoryBlock", + ); + }, + ); + var videoFeedIndex = 0; for (var e in _defaultHomeVideoFeedPlaylistInfoArray) { + videoFeedIndex++; + final title = "Video Feed $videoFeedIndex"; widgetList.addAll([ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, + ), + child: Text( + title, + style: const TextStyle( + fontSize: 20, + ), + ), + ), const SizedBox( height: 20, ), @@ -412,6 +471,13 @@ class _HomeScreenState extends State { channel: e.channelId, playlist: e.playlistId, enablePictureInPicture: _enablePip, + onVideoFeedGetFeedId: (feedId) { + FWExampleLoggerUtil.log("onVideoFeedGetFeedId feedId: $feedId"); + HostAppService.getInstance().widgetInfoMap[feedId] = WidgetInfo( + title: title, + type: "VideoFeed", + ); + }, ), ), const SizedBox( @@ -421,10 +487,6 @@ class _HomeScreenState extends State { const SizedBox( height: 20, ), - _buildListItemPlaceholder(context), - const SizedBox( - height: 20, - ), ]); } diff --git a/FireworkFlutterSDKSample/lib/screens/link_content/link_content_screen.dart b/FireworkFlutterSDKSample/lib/screens/link_content/link_content_screen.dart index 2bb6b9541..2538495f2 100644 --- a/FireworkFlutterSDKSample/lib/screens/link_content/link_content_screen.dart +++ b/FireworkFlutterSDKSample/lib/screens/link_content/link_content_screen.dart @@ -33,13 +33,36 @@ class _LinkContentScreenState extends State { ..setJavaScriptMode(JavaScriptMode.unrestricted) ..loadRequest(Uri.parse(url)); + String? iOSUrl; + if (arg["iOSUrl"] is String) { + iOSUrl = arg["iOSUrl"] as String; + } + + String? androidUrl; + if (arg["androidUrl"] is String) { + androidUrl = arg["androidUrl"] as String; + } + WidgetsBinding.instance.addPostFrameCallback((_) { - EasyLoading.showToast( - S.of(context).pageUrlToastText(url), - duration: const Duration( - seconds: 5, - ), - ); + if (iOSUrl != null && androidUrl != null) { + EasyLoading.showToast( + S.of(context).multiplePageUrlsToastText( + url, + iOSUrl, + androidUrl, + ), + duration: const Duration( + seconds: 5, + ), + ); + } else { + EasyLoading.showToast( + S.of(context).pageUrlToastText(url), + duration: const Duration( + seconds: 5, + ), + ); + } }); } } diff --git a/FireworkFlutterSDKSample/lib/screens/more/more_screen.dart b/FireworkFlutterSDKSample/lib/screens/more/more_screen.dart index 7553f0fbe..05a372ef9 100644 --- a/FireworkFlutterSDKSample/lib/screens/more/more_screen.dart +++ b/FireworkFlutterSDKSample/lib/screens/more/more_screen.dart @@ -7,7 +7,7 @@ import 'package:fw_flutter_sdk_example/utils/host_app_service.dart'; import '../../generated/l10n.dart'; import '../../widgets/fw_app_bar.dart'; -const fwNativeVersionOfAndroid = '6.10.1'; +const fwNativeVersionOfAndroid = '6.10.2'; class MoreScreen extends StatefulWidget { const MoreScreen({ diff --git a/FireworkFlutterSDKSample/lib/utils/fw_url_util.dart b/FireworkFlutterSDKSample/lib/utils/fw_url_util.dart new file mode 100644 index 000000000..f32458e43 --- /dev/null +++ b/FireworkFlutterSDKSample/lib/utils/fw_url_util.dart @@ -0,0 +1,55 @@ +class FWUrlInfo { + String? url; + String? iOSUrl; + String? androidUrl; + FWUrlInfo({ + this.url, + this.iOSUrl, + this.androidUrl, + }); +} + +class FWUrlUtil { + static FWUrlInfo? parseUrl({ + required String url, + required String iOSQueryName, + required String androidQueryName, + }) { + if (url.isEmpty) { + return null; + } + + final uri = Uri.tryParse(url); + if (uri == null) { + return null; + } + + final queryParameters = uri.queryParameters; + + final urlInfo = FWUrlInfo(); + + // Get iOS url and Android Url from query + queryParameters.forEach((key, value) { + if (key == iOSQueryName) { + urlInfo.iOSUrl = value; + } + + if (key == androidQueryName) { + urlInfo.androidUrl = value; + } + }); + + // Remove iOS url and Android url from query + final resultUri = uri.replace( + queryParameters: Map.fromEntries( + queryParameters.entries.where( + (entry) => entry.key != iOSQueryName && entry.key != androidQueryName, + ), + ), + ); + + urlInfo.url = resultUri.toString(); + + return urlInfo; + } +} diff --git a/FireworkFlutterSDKSample/lib/utils/host_app_service.dart b/FireworkFlutterSDKSample/lib/utils/host_app_service.dart index 30d7be27d..2b76cbf7d 100644 --- a/FireworkFlutterSDKSample/lib/utils/host_app_service.dart +++ b/FireworkFlutterSDKSample/lib/utils/host_app_service.dart @@ -1,9 +1,11 @@ import 'dart:convert'; import 'dart:io'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:fw_flutter_sdk_example/constants/fw_example_event_name.dart'; import 'package:fw_flutter_sdk_example/models/app_language_info.dart'; import 'package:fw_flutter_sdk_example/models/cart_item.dart'; +import 'package:fw_flutter_sdk_example/utils/fw_url_util.dart'; import 'package:path_provider/path_provider.dart'; import 'package:fw_flutter_sdk/fw_flutter_sdk.dart'; import 'package:fw_flutter_sdk_example/utils/fw_example_logger_util.dart'; @@ -11,6 +13,15 @@ import 'package:fw_flutter_sdk_example/utils/shopify_client.dart'; import '../my_app.dart'; +class WidgetInfo { + String title; + String type; + WidgetInfo({ + required this.title, + required this.type, + }); +} + class HostAppService { static HostAppService? _instance; @@ -21,6 +32,8 @@ class HostAppService { bool enablePausePlayer = false; + Map widgetInfoMap = {}; + HostAppService._(); factory HostAppService.getInstance() => _getInstance(); @@ -28,15 +41,30 @@ class HostAppService { Future onShopNow(ShoppingCTAEvent? event) async { FWExampleLoggerUtil.log( "onShopNow feedId: ${event?.video.feedId} videoId: ${event?.video.videoId}"); - + final feedId = event?.video.feedId ?? ""; + final widgetInfo = HostAppService.getInstance().widgetInfoMap[feedId]; + EasyLoading.showToast( + "The user comes from ${widgetInfo?.title ?? ""}", + duration: const Duration( + seconds: 5, + ), + ); if (event == null) { return null; } await startFloatingPlayer(); + final url = event.url; + final urlInfo = FWUrlUtil.parseUrl( + url: url, iOSQueryName: "ios", androidQueryName: "android"); + FWExampleLoggerUtil.log("onShopNow url: ${urlInfo?.url}"); + FWExampleLoggerUtil.log("onShopNow iOS url: ${urlInfo?.iOSUrl}"); + FWExampleLoggerUtil.log("onShopNow android url: ${urlInfo?.androidUrl}"); globalNavigatorKey.currentState?.pushNamed('/link_content', arguments: { - "url": event.url, + "url": urlInfo?.url ?? '', + "iOSUrl": urlInfo?.iOSUrl ?? '', + "androidUrl": urlInfo?.androidUrl ?? '', }); await event.ctaHandler?.complete( @@ -205,6 +233,21 @@ class HostAppService { CustomClickLinkButtonEvent? event) async { FWExampleLoggerUtil.log( "onCustomClickLinkButton feedId: ${event?.video?.feedId} videoId: ${event?.video?.videoId}"); + + FWExampleLoggerUtil.log( + "onCustomClickLinkButton original url: ${event?.url}"); + + final urlInfo = FWUrlUtil.parseUrl( + url: event?.url ?? "", + iOSQueryName: "ios", + androidQueryName: "android", + ); + + FWExampleLoggerUtil.log("onCustomClickLinkButton url: ${urlInfo?.url}"); + FWExampleLoggerUtil.log( + "onCustomClickLinkButton iOS url: ${urlInfo?.iOSUrl}"); + FWExampleLoggerUtil.log( + "onCustomClickLinkButton android url: ${urlInfo?.androidUrl}"); await startFloatingPlayer(); globalNavigatorKey.currentState?.pushNamed('/link_content', arguments: { "url": event?.url ?? '', @@ -224,13 +267,24 @@ class HostAppService { void onCustomCTAClick(CustomCTAClickEvent? event) { FWExampleLoggerUtil.log( "onCustomCTAClick feedId: ${event?.video.feedId} videoId: ${event?.video.videoId}"); + final url = event?.url ?? ""; + FWExampleLoggerUtil.log("onCustomCTAClick original url: $url"); + + final urlInfo = FWUrlUtil.parseUrl( + url: url, iOSQueryName: "ios", androidQueryName: "android"); + FWExampleLoggerUtil.log("onCustomCTAClick base url: ${urlInfo?.url}"); + FWExampleLoggerUtil.log("onCustomCTAClick iOS url: ${urlInfo?.iOSUrl}"); + FWExampleLoggerUtil.log( + "onCustomCTAClick android url: ${urlInfo?.androidUrl}"); startFloatingPlayer().then((_) { if (enablePausePlayer) { event?.playerHandler?.pause(); } globalNavigatorKey.currentState?.pushNamed('/link_content', arguments: { - "url": event?.url ?? '', + "url": urlInfo?.url ?? '', + "iOSUrl": urlInfo?.iOSUrl ?? '', + "androidUrl": urlInfo?.androidUrl ?? '', }); }); } diff --git a/FireworkFlutterSDKSample/pubspec.lock b/FireworkFlutterSDKSample/pubspec.lock index d0d54f149..b2fb3dac7 100644 --- a/FireworkFlutterSDKSample/pubspec.lock +++ b/FireworkFlutterSDKSample/pubspec.lock @@ -308,10 +308,10 @@ packages: dependency: "direct main" description: name: fw_flutter_sdk - sha256: "29d8ad89827e5081a6a0a011877c122819d36fe4351e72e64973fcaa1cc19322" + sha256: fe13fd096466952386270a5e8be34c387d9489cff075642cc682ea346e30d7b0 url: "https://pub.dev" source: hosted - version: "2.8.0" + version: "2.8.1" glob: dependency: transitive description: diff --git a/FireworkFlutterSDKSample/pubspec.yaml b/FireworkFlutterSDKSample/pubspec.yaml index cf17dbdf6..f2b325ba1 100644 --- a/FireworkFlutterSDKSample/pubspec.yaml +++ b/FireworkFlutterSDKSample/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: sdk: flutter - fw_flutter_sdk: 2.8.0 + fw_flutter_sdk: 2.8.1 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.5 diff --git a/docs/__404error.html b/docs/__404error.html index de7da878a..38a90c171 100644 --- a/docs/__404error.html +++ b/docs/__404error.html @@ -93,7 +93,7 @@
fw_flutter_sdk