This is a template repository for creating a custom provider for the Flixclusive applicatoin.
A provider is an extension or addon that allows you to fetch media content (like movies or shows) from various sources. For Flixclusive, these providers act like browser extensions that help gather media links from different platforms.
If you're new to coding, think of a provider as a bridge that connects a streaming service (like Netflix or Amazon Prime) to the Flixclusive app, allowing it to display content from that service.
Follow these steps to set up and create your own provider:
-
Clone the repository:
- Click "Use this template" and create a new repository for your provider.
- Make sure to check "Include all branches" as the build branch is required.
-
Project structure:
- The
providers
folder contains an example provider that demonstrates how to create your own. You can use this as a starting point. - The
src/main
folder holds the code that drives your provider. - Important files:
build.gradle.kts
: Contains build configuration. Open it and replace placeholders (e.g., authors, versions, repository url) with your information. Follow the comments in the file for guidance.
- The
-
Create your provider:
-
Customize the example provider in the
providers
folder or create a new one by following the project structure.Note: When creating or modifying a provider you must edit the
settings.gradle.kts
on the root project and edit the include block.include( "BasicDummyProviderRenamed", // <- renamed provider // "BasicDummyWebViewProvider", // <- deleted provider "NewProvider" // <- newly created provider )
-
Write the code for your provider that fetches media content from the source you want to integrate with.
-
-
Build and deploy:
-
To package your provider, run the following command in your terminal.:
./gradlew :NewProvider:make
This will build your provider into a distributable package.
-
However, to test your provider on an online emulator or your device, use the following command:
./gradlew :NewProvider:deployWithAdb
The
deployWithAdb
task depends on themake
task so running it will automatically build and deploy the provider to the app. -
If you are using the debug version of the app, add the
--debug-app
argument:./gradlew :NewProvider:deployWithAdb --debug-app
-
If you want to attach a debugger tool, add the
--wait-for-debugger
:./gradlew :NewProvider:deployWithAdb --wait-for-debugger
Then go ahead and click the attach debugger button.
-
-
Testing your provider:
- Once deployed, you can test how your provider behaves within the Flixclusive app. Check if it successfully fetches content from the specified sources.
- There is also a "Test provider" option in the app to automate the testing.
If you encounter any issues or have questions, feel free to join the discord community and ask for guidance there.