-
-
Notifications
You must be signed in to change notification settings - Fork 402
Extension API
Learn 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.
- Add the API dependency to your Android project:
implementation 'com.uwetrottmann.seriesguide:seriesguide-api:2.0.0'
The artifact is published on Maven Central. - Create a new class that extends
SeriesGuideExtension
and implements at least one of theonRequest
methods. - Create a new class that extends
SeriesGuideExtensionReceiver
. - Add the required tags to your
AndroidManifest.xml
file. Read the class documentation ofSeriesGuideExtension
for details.
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 also exported so you can directly start it if you want to direct users to it.
An example extension Android project for Android Studio is available.
Take a look at the API reference documentation for additional details, for example to add a configuration screen.
- Android O support: extensions must be registered through a
<receiver>
component to work around background restrictions introduced for apps targeting SDK 26. You can subclass the newSeriesGuideExtensionReceiver
and register it in your manifest. -
Existing extensions will no longer work and are disabled when updating SeriesGuide as they are registered using a
<service>
component. See the example project for guidance on how to create a backwards-compatible extension that will work with old and new versions of SeriesGuide. -
SeriesGuideExtension
now implementsJobIntentService
instead ofIntentService
. Therefore on SDK 25 and lower, the library will add theWAKE_LOCK
permission required byJobIntentService
.
- Converted the library to an Android library (AAR).
- Add show release date to
Episode
. Formatted as an ISO string, for example:2016-09-22T02:00:00.000Z
. - Support for movies. Added
Movie
and an additonalonRequest
method specific for movie actions. Extensions can choose if to implement episode or movie actions, or both.
- Add absolute number to
Episode
.
- Updated
Intents
helper class to create intents that do not create new tasks.
- Create
Intents
class to create intents for viewing shows or episodes with SeriesGuide.
- Initial release. Extensions can provide actions for episodes.