Baked Feed - GluedIn
Baked Feed
The SDK has an option to use the predefined feed as a separate component that can be integrated into existing applications and can be launched within any android activity screen via any user-defined CTA.
  • Integration steps to add Baked Feed SDK:
    • Add the below dependency into app/build.gradle
    • To add only core module dependency, add below
                                  		implementation 'com.gluedin.lowcode:gluedin:2.0.0'
                                  	
    • To add Baked the Feed module into the project, add below pod SDK along with the core dependency
                                  		implementation 'com.gluedin.lowcode.feed:feed:2.0.0'
                                  	
    Supported Feed Formats:
    • Square Feed
    • VerticalFeed
  • Square Feed:
    Class Name: FeedFragment
    Available Callback Methods: Below are the methods which will be triggered on multiple events like video play/pause.
    Convenient to load baked creator module and its protocol callback methods.
         
     fun onBackPressCall()
    fun likeAction(currentFeedItem: VideoInfo, like: Boolean)
    fun navigateToUserProfileScreen(userId: String)
    fun shareAction(currentFeedItem: VideoInfo?)
    fun scrollToNextVideo(currentFeedItem: VideoInfo)
    fun scrolledToPreviousVideo(currentFeedItem: VideoInfo)
    fun videoStarted(currentFeedItem: VideoInfo?)
    fun videoPlayPause(isPlaying: Boolean, currentFeedItem: VideoInfo?)
    fun onCommentSubmitted(currentFeedItem: VideoInfo)
    fun videoWatched(currentFeedItem: VideoInfo?)
    fun mediaReady(currentFeedItem: VideoInfo?)
    fun onCommentEdit(currentFeedItem: VideoInfo)
    fun onApiError(apiName: GluedInAPIName?, throwable: Throwable? = null)
    fun onCommentBottomSheetDismiss()
    fun onPlayerErrorReceived(error: PlayerException, currentFeedItem: VideoInfo?)
    fun onVideoEnd(currentFeedItem: VideoInfo?)
    fun onVideoRestarted(currentFeedItem: VideoInfo?)
    fun navigateToHashtagDetailPage(hashtagTitle: String, currentFeedItem: VideoInfo?)
    fun onCommentClick(currentFeedItem: VideoInfo?)
    fun onCommentDelete(currentFeedItem: VideoInfo)
    fun onTaggedUserProfile(userId: String)
    fun navigateToSignUp(currentFeedItem: VideoInfo?)
    fun onShoppableItemClick(product: Product, position: Int)
    fun onTopProfileClick(profileInfo: Profile)
    fun onUserFollow(currentFeedItem: VideoInfo?)
    fun onBusinessAccountDelete()
    fun onUserDeactivate()
                            	
                            
  • Vertical Feed:
    Class Name: VerticalFeedFragment
    Available Callback Methods: Below are the methods which will be triggered on multiple events like video play/pause.
    Convenient to load baked creator module and its protocol callback methods.
         
    fun onBackPressCall()
    fun likeAction(currentFeedItem: VideoInfo, like: Boolean)
    fun navigateToUserProfileScreen(userId: String)
    fun shareAction(currentFeedItem: VideoInfo?)
    fun scrollToNextVideo(currentFeedItem: VideoInfo)
    fun scrolledToPreviousVideo(currentFeedItem: VideoInfo)
    fun videoStarted(currentFeedItem: VideoInfo?)
    fun videoPlayPause(isPlaying: Boolean, currentFeedItem: VideoInfo?)
    fun onSingleTap(currentFeedItem: VideoInfo?, isPlay: Boolean)
    fun onDoubleTap(currentFeedItem: VideoInfo?)
    fun onCommentSubmitted(currentFeedItem: VideoInfo)
    fun videoWatched(currentFeedItem: VideoInfo?)
    fun mediaReady(currentFeedItem: VideoInfo?)
    fun onCommentEdit(currentFeedItem: VideoInfo)
    fun onApiError(apiName: GluedInAPIName?, throwable: Throwable? = null)
    fun onCommentBottomSheetDismiss()
    fun onPlayerErrorReceived(error: PlayerException, currentFeedItem: VideoInfo?)
    fun onVideoEnd(currentFeedItem: VideoInfo?)
    fun onVideoRestarted(currentFeedItem: VideoInfo?)
    fun navigateToHashtagDetailPage(hashtagTitle: String, currentFeedItem: VideoInfo?)
    fun onCommentClick(currentFeedItem: VideoInfo?)
    fun onCommentDelete(currentFeedItem: VideoInfo)
    fun onTaggedUserProfile(userId: String)
    fun navigateToSignUp(currentFeedItem: VideoInfo?)
    fun onShoppableItemClick(product: Product, position: Int)
    fun onUserFollow(currentFeedItem: VideoInfo?)
    fun onBusinessAccountDelete()
    fun onUserDeactivate()
                            	
                            
  • Integration Steps:
    • Create your own feed fragment class and extend it with FeedFragment or VerticalFeedFragment class of GluedIn SDK
    • Use your feed fragment class in your activity.
    • Once you extend the GluedIn SDK’s FeedFragment or VerticalFeedFragment class, the above methods of respective class need to be overridden for a callback of the actions performed by the end user.
    	
    class YourOwnSquareFeedFragment : FeedFragment() {
         override fun navigateToUserProfileScreen(userId: String) = Unit
    }
    
    
    class YourOwnVerticalFeedFragment : VerticalFeedFragment() {
         override fun navigateToUserProfileScreen(userId: String) = Unit
    }
    	
    
    How to call ?
          
    // Baked Feed method to launch Feed module
    
    // Option to launch baked feed by clicking on feed button
    // Controller can be open from any button or bottom bar or load screen or any user interction option
    
    @IBAction func callToLaunchedBackedFeedMethod(_ sender: Any) {
       self.navigationController?.pushViewController(
           GluedInFeed.shared.getFeedViewController(
                 delegate: self,
                 isBackEnable: true) ?? UIViewController(),
           animated: true)
     }
                            	
                            
  • How to enable CoachMark:

    Users can enable/disable the coachmark on Feed Screen by using enableFeedCoachMark() method. This method must be called in the onCreate() method of the Fragment. Refer to the snippet below:

          
    override fun onCreate(savedInstanceState: Bundle?) {
       super.onCreate(savedInstanceState)
       enableFeedCoachMark(true)
    }
    
  • Enable Ads into Feed:
    • Open AndroidManifest.xml file of the Application
    • Paste add below metadata tag in tag and put your ad application id there.
    • Now add Banner, Interstitial and Native Ad ids on the Console. Add label