Skip to content

Example Android app project using the SeriesGuide extension API and view intents.

License

Notifications You must be signed in to change notification settings

UweTrottmann/SeriesGuide-Extension-Example

Repository files navigation

SeriesGuide-Extension-Example

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.

How to build an extension for SeriesGuide

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.

Extensions examples

Get started

  1. Add the API dependency to your Android project:

    implementation("com.uwetrottmann.seriesguide:seriesguide-api:2.2.1")
    

    The artifact is published on Maven Central.

  2. Create a new class that extends SeriesGuideExtension and overrides at least one of the onRequest methods.

  3. Create a new class that extends SeriesGuideExtensionReceiver.

  4. Add the required tags to your AndroidManifest.xml file. See AndroidManifest.xml of the example app. See the class documentation of SeriesGuideExtension 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.

How to deep link to a show or episode

Use the Intents class. See the MainActivity class for examples.

API Reference

Take a look at the API reference documentation for additional details, for example to add a configuration screen for an extension.

API change log

See the SeriesGuide repository.

About

Example Android app project using the SeriesGuide extension API and view intents.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages