Example Android project using the SeriesGuide extension API.
This project is built with Gradle. Import the project in Android Studio using the settings.gradle
file.
This work by Uwe Trottmann is licensed under the Apache License 2.0.
If added by the user in SeriesGuide, an extension can provide an action button shown below an episode or movie.
The button might link to external content (app deep-link, web page, ...) or trigger an action in another app (play, record, ...). Or it can just display some status information (e.g. "downloaded"). Have a look at the available extensions on Google Play.
-
Add the API dependency to your Android project:
implementation("com.uwetrottmann.seriesguide:seriesguide-api:2.2.1")
The artifact is published on Maven Central.
-
Create a new class that extends
SeriesGuideExtension
and overrides at least one of theonRequest
methods. -
Create a new class that extends
SeriesGuideExtensionReceiver
. -
Add the required tags to your
AndroidManifest.xml
file. SeeAndroidManifest.xml
of the example app. See the class documentation ofSeriesGuideExtension
for details and additional configuration, e.g. how to add a configuration activity.When targeting Android 11 (SDK 30) add
queries
tags to allow the extension to see the SeriesGuide app (learn about package visiblity changes):<manifest> <!-- When targeting SDK 30 (R), make the SeriesGuide app visible to this extension. --> <queries> <package android:name="com.battlelancer.seriesguide" /> <package android:name="com.uwetrottmann.seriesguide.amzn" /> </queries> </manifest>
Install your extension side-by-side with SeriesGuide. You should be able to add it from the extension customization screen.
The activity of this screen, com.battlelancer.seriesguide.extensions.ExtensionsConfigurationActivity
,
is exported so your code can directly start it, e.g. to direct users to add your extension.
Use the Intents
class.
See the MainActivity
class for examples.
Take a look at the API reference documentation for additional details, for example to add a configuration screen for an extension.
See the SeriesGuide repository.