Migrate From v5
Why should you Migrate?
Firework Android SDK v5 is no longer supported and has been deprecated. The new version, v6, is a complete rebuild of our Android SDK and not just an update of v5. With v6, you can enjoy an improved video-watching experience and seamless integration of short-form shoppable videos and live-stream shopping features in your apps. All future major feature upgrades will be on top of v6. Therefore, it is essential to migrate to v6 if you want to utilize all the latest features being introduced. This guide offers you a step-by-step process to help you upgrade with ease.
Please discuss this with your Firework point of contact before deciding to go ahead with the migration.
Feature Comparison with V5
Last Updated April 2, 2024
Features | v5 | v6 |
---|---|---|
Discover Feed | ✓ | ✓ |
Channel Feed | ✓ | ✓ |
Playlist Feed | ✓ | ✓ |
Playlist Group Feed | ✓ | Coming Soon |
Dynamic Content | ✓ | ✓ |
Hashtag Feed | ✕ | ✓ |
SKU Feed | ✕ | ✓ |
Horizontal/Vertical/Grid Layouts | ✓ | ✓ |
CTA button on Videos | ✓ | ✓ |
CTA button click handler and listener | ✓ | ✓ |
Shoppable Videos (Product Cards & Shopping experience | ✓ | ✓ |
Video Analytics Events listener | ✓ | ✓ |
Share button click listener | ✓ | ✓ |
Feed item click listener | ✓ | ✓ |
Video Player configurations | ✓ | ✓ |
Share and Deep-link mechanism | ✓ | ✓ |
AutoPlay in Feed and its configuration | ✓ | ✓ |
Livestream | ✓ | ✓ |
IMA Ads | ✓ | ✓ |
FWAI Ads | ✓ | ✓ |
Storyblock | ✓ | ✓ |
Picture in Picture(Outside App) | ✕ | ✓ |
Picture in Picture(Inside App) | ✕ | ✓ |
MultiHost Livestream (Low Latency) | ✕ | ✓ |
Retail Media Network (RMN) Ad support | ✕ | ✓ |
Interstitial Ima Ad support | ✕ | ✓ |
Interstitial FWAI Ad support | ✕ | ✓ |
In-App Language Switching | ✓ | ✓ |
Digital Showroom | ✕ | ✓ |
Migration Steps
1. Update Dependencies
The new SDK is available in maven central so you have to add mavenCentral()
in your repositories, and you can remove the v5 Jitpack repository.
Remove the below dependencies from build.gradle
Add the following
Learn more about dependencies of v6
2. Android Manifest Changes
Remove the following activity from AndroidManifest.xml file as it is no longer required in v6.
In v5, If you enabled adding checksum to data reporting by adding the following snippet to AndroidManifest.xml, you can remove it. Enabling check sum is now part of SDK initialization which can be found in the next step.
3. SDK Initialization Changes
Remove the below initialization code required for v5, which must be added in your app's application class
Instead, Initialize our v6 SDK as below in the onCreate() of Application class
4. Updating Video Feed Layout Components
Update the video feed view component used in layout files. Change the following used in v5
To below VideoFeedView for v6
Similarly, refer to the relevant pages for other types of feed layouts in v6.
5. Video Feed Configurations
In v6, video feed configurations can be done as attributes in FWVideoFeedView
in XML layout or using ViewOptions builder in Java/Kotlin Classes. Refer below page for more details
Notable changes in v6 for Video Feed Configurations compared to v5 are:
Display/Hide the Video Title(Caption) - change from
app:showTitle="true"
toapp:fw_showFeedTitle="true"
Update feed title position to
app:fw_feedTitlePosition
Styling the title text is not using a style defined in the themes file. Instead, it can be configured using attributes for the VideoFeedView as defined in above linked page
Styling the thumbnail image style for corner radius is also now using attributes in FwVideoFeedView instead of style definition in the theme file
Fully Custom Feed Layouts are not supported currently in v6, but we provide more ways to customize it compared to v5.
New Feed Configurations available in v6
Column Count for Grid View
Feed Background Color
Item Spacing for spacing between feed items
Enable or Disable Ads on Backward Swipe
Number of lines of the title text
Display or Hide Play icon on thumbnails
Ad badge background color
Ad badge text color
Ad Label
6. Video Player
All the Video player properties supported in v5 are also supported in v6. But the implementation is a bit different as it is along with FwVideoFeedView
properties.
So you will need to remove the VideoPlayerProperties initialization part of v5 and then add the configuration using view properties. Refer to the specifics of each Video Player Property as documented in the below link for v6.
Another change is that ad badge styling(done as style definitions in v5) can also be defined using FwVideoFeedView
properties
Add to Cart Button styling in v6 is as follows
Add to CTA Button styling in v6 is as follows
7. CTA Click Handling
If CTA click handler is not implemented by the host application, the default behaviour in v6 is to open the link in the default browser of the device, while in v5 it will open in a webview within the app.
Refer this page for implementation of CTA click handler in v6.
If you have implemented CTA click handling in v5, you can remove the below handler
and instead, add the below handler and copy the custom navigation logic within this. Refer to below code.
8. Analytics - Event Listener Updates
We have improved analytics events coverage in v6 though there are differences in the way it is implemented. Refer the analytics page below for detailed information.
v5 Event | v6 Equivalent |
---|---|
video-impression | No separate event for this, but can be recorded based on other events like OnPlayingChanged or OnPrepared or OnProgress |
video-start | OnStarted |
video-first-quartile | OnFirstQuartile |
video-midpoint | OnSecondQuartile |
video-third-quartile | OnThirdQuartile |
video-complete | OnEnded |
video-session-end | OnEnded |
video-ad-start | First **** trigger of OnProgress with isAd boolean true in event data |
video-ad-end | OnEnded event with isAd = true in event data |
video-click-cta | This can be logged in CtaButtonClickHandler **** as all the required data is provided along with feedElementAnalyticsData |
videoShare | This can be logged in ShareButtonClickListener **** as all the required data is provided along with feedElementAnalyticsData |
videoStartError | OnError |
videoAdStartError | OnError with isAd = true |
The event data is different from v5 and it provides the following values as part of VideoInfo object
Progress is not part of event data in v6, but triggered as a separate event every 1000 milliseconds
9. Updating Shopping Interfaces
Shopping Interfaces in v6 are much more advanced and you can customize the Shopping cart behaviour too. If you have currently implemented Shopping interfaces in v5, you can go ahead and remove the Baya.cartInterface and Baya.productInterface implementations first while saving the product hydration or cart update logic for your app. This will be needed for adding to the new interfaces provided in v6.
Refer to the below page for detailed implementation information on Shoppable videos on v6
Last updated