Android Apps
Overview
The Catch Lite library is derived from the codebase of the existing Catch application, written in the Flutter framework. Core functionality from the main application is compiled as Native libraries.
The below guide details how the CatchLite Library can be integrated into an existing Android (Native) application.
Authentication
Create a new account on MyGet, where the Catch Library is hosted
Share your MyGet username with your account manager at Catch.
You will receive a confirmation email from MyGet confirming that you have been added to the CatchLite feeds.
Setup Repositories
Add the following fragment to the repositories {} block in settings.gradle, making sure to substitute the correct MyGet username/password.
maven { url "https://jitpack.io" }
maven {Add commentMore actions
url 'https://www.myget.org/F/catch-lite/maven'
credentials {
username "MYGET_USERNAME"
password "MYGET_PASSWORD"
}
}
maven {
credentials {
username "MYGET_USERNAME"
password "MYGET_PASSWORD"
}
url 'https://www.myget.org/F/urbanminded-pop-android/maven'
}
maven {
url "https://storage.googleapis.com/download.flutter.io"
}Add Catch and Flutter Libraries
Add the following dependencies to app/build.gradle:
After this step, sync the Gradle sections and verify the application can build. Recent versions of Android Studio may prompt to addlibs.androidx.navigation.fragment.ktx and libs.androidx.navigation.ui.ktx; this is fine.
Add Button to trigger Catch
Update the default view in app/src/main/res/layout/activity_main.xml with a button to trigger the Catch:
Make MainActivity implement CatchEventListener
Update MainActivity.kt so that the activity class implements CatchClientListener:
This allows your code to receive events from the Catch Lite library.
Integrate Catch Client with Button
Add the following code to onCreate() in MainActivity:
Build and Run
It should now be possible to run the project on a mobile device and view Catch-enabled content.
Last updated

