Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,15 @@ steps:
plugins: [$CI_TOOLKIT]
command: |
.buildkite/publish-mediapicker-source-camera.sh
- label: "Publish :mediapicker:source-gif"
depends_on:
- "publish-mediapicker-domain"
plugins: [$CI_TOOLKIT]
command: |
.buildkite/publish-mediapicker-source-gif.sh
# Temporarily disabled: Tenor API is being sunset on June 30, 2026.
# Re-enable this CI step after migrating to a new GIF provider.
# See mediapicker/source-gif/README.md for details.
# - label: "Publish :mediapicker:source-gif"
# depends_on:
# - "publish-mediapicker-domain"
# plugins: [$CI_TOOLKIT]
# command: |
# .buildkite/publish-mediapicker-source-gif.sh
- label: "Publish :mediapicker:source-wordpress"
depends_on:
- "publish-mediapicker-domain"
Expand Down
31 changes: 31 additions & 0 deletions mediapicker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# mediapicker

The core MediaPicker library module providing media selection functionality for Android applications.

## Tenor API Deprecation Notice

> [!WARNING]
> The Tenor API used by the `source-gif` module is being sunset on **June 30, 2026**. This also affects references in this parent module.

This module contains Tenor-related references that will need to be updated when migrating to an alternative GIF provider:

| File | Reference |
|------|-----------|
| `src/main/res/menu/media_picker_lib_menu.xml` | Menu item ID `mnu_choose_from_tenor_library` |
| `src/main/java/org/wordpress/android/mediapicker/ui/MediaPickerFragment.kt` | `tenorLibraryMenuItem` variable |
| `src/main/res/values/strings.xml` | String `photo_picker_gif` with value "Choose from Tenor" |

For full deprecation details, migration recommendations, and steps, see the [source-gif module README](source-gif/README.md).

## Module Structure

The mediapicker library is organized into the following modules:

| Module | Description |
|--------|-------------|
| `mediapicker` | Core UI and picker functionality |
| `domain` | Domain models and interfaces |
| `source-device` | Device storage media source |
| `source-camera` | Camera capture media source |
| `source-gif` | GIF search media source (Tenor API - **deprecated**) |
| `source-wordpress` | WordPress media library source |
68 changes: 68 additions & 0 deletions mediapicker/source-gif/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# source-gif

> [!WARNING]
> **DEPRECATION WARNING**: This module uses the Tenor API which is being sunset on **June 30, 2026**. Do not use this module for new integrations. If you are currently using this module, you must migrate to an alternative GIF provider before the deprecation date.

## Overview

This module provides GIF search functionality for the WordPress MediaPicker library using the [Tenor API](https://tenor.com/). It implements the `MediaSource` interface to allow users to search and select GIFs within the media picker.

## Tenor API Deprecation

Google has announced the sunset of the Tenor API:

![Tenor API Deprecation Notice](tenor-deprecation.png)

Here are the key dates:

| Date | Impact |
|------|--------|
| **January 13, 2026** | New API key sign-ups and new integrations will no longer be accepted |
| **June 30, 2026** | All API and Ads Distribution Agreements with Tenor will be terminated |
| **After June 30, 2026** | The API will start rejecting all requests with errors |

### What This Means

- **New integrations**: If you haven't already integrated this module, do not use it. The Tenor API no longer accepts new API key registrations.
- **Existing integrations**: You must plan and implement a migration to an alternative GIF provider before June 30, 2026.

## Migration Recommendations

Consider migrating to an alternative GIF provider:

- [GIPHY API](https://developers.giphy.com/) - Popular GIF platform with comprehensive API

### Migration Steps

1. Choose an alternative GIF provider
2. Update this module to use the new provider's API instead of Tenor
3. Replace the Tenor API key with the new provider's API key
4. Update Tenor references in the parent `mediapicker` module:
- `src/main/res/menu/media_picker_lib_menu.xml` - menu item ID `mnu_choose_from_tenor_library`
- `src/main/java/org/wordpress/android/mediapicker/ui/MediaPickerFragment.kt` - references to `tenorLibraryMenuItem`
- `src/main/res/values/strings.xml` - string `photo_picker_gif` with value "Choose from Tenor"
5. Test thoroughly before the deprecation date

## Module Structure

```
source-gif/
├── GifMediaDataSource.kt # MediaSource implementation for GIF search
├── GifMediaPickerSetup.kt # MediaPicker configuration for GIF source
├── GifSourceModule.kt # Hilt dependency injection module
├── TenorApiKey.kt # API key qualifier annotation
├── TenorGifClient.kt # Tenor API client wrapper
└── util/
└── NetworkUtilsWrapper.kt
```

## Dependencies

This module requires:

- `tenor-android-core-jetified` - Jetified Tenor GIF library (bundled as AAR)
- `mediapicker:domain` - Core MediaPicker domain module

## License

See the [LICENSE](../../LICENSE) file in the repository root.
Binary file added mediapicker/source-gif/tenor-deprecation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.