Skip to main content
The Choicely SDK allows you to create custom Fragment and embed Choicely content (articles, feeds, etc.) alongside your own UI logic.

Steps to Add a Custom Fragment

1. Create a Custom Fragment

Create a new fragment. This is where you’ll define your fragment’s layout and any custom logic.

2. Create a Content Factory

Create a factory class that implements ChoicelyContentFragmentFactory. This factory is responsible for providing an instance of your custom content fragment.

3. Register the Factory in Application Class

Finally, in your Application class (e.g., YourApplication.java or YourApplication.kt), add a call to ChoicelySDK.factory().setContentFactory() to use your custom Fragment.

4. Set the Navigation Path

Define the navigation path in the builder for your custom Fragment.
How to use navigation