Can I control BeyondPod from external applications?

BeyondPod currently exposes 3 types of integration points to external applications:

  • Broadcasts of the currently Played Episode. BeyondPod will broadcast events on each Play/Pause. The broadcast is "mobi.beyondpod.action.PLAYBACK_STATUS" with the following parameters:
    • playing - boolean - True if episode is currently playing
    • feed-name - string - Name of the episode feed
    • feed-url - string - URL of the episode feed
    • episode-name - string - Name of the episode (usually comes from the associated post title)
    • episode-url - string - URL of the episode media file (where the episode was downloaded or straming)
    • episode-file - string - If the episode is downloaded, the name of the episode file stored on the device SD card.
    • episode-post-url - string - URL of the episode's web page (if any)
    • episode-mime - string - Episode format as mime type (for example audio/mp3, video/mp4 etc.)
    • episode-summary - string - 500 symbol snippet from the show notes (comes from the post content)
    • episode-duration - long - Total episode duration in seconds
    • episode-position - long - Current playing position in seconds
  • Control Commands. BeyondPod will listen and respond to the following broadcasts from any external applications:
    • mobi.beyondpod.command.UPDATE_CATEGORY - use "category" extra to specify the category name you want to update
    • mobi.beyondpod.command.UPDATE_SMART_PLAY
    • mobi.beyondpod.command.START_SMART_PLAY
    • mobi.beyondpod.command.PLAY
    • mobi.beyondpod.command.PAUSE
    • mobi.beyondpod.command.PLAY_NEXT
    • mobi.beyondpod.command.PLAY_PREVIOUS
    • mobi.beyondpod.command.SKIP_FORWARD
    • mobi.beyondpod.command.SKIP_BACKWARD
    • mobi.beyondpod.command.SKIP_TO_END
    • mobi.beyondpod.command.SET_PLAYBACK_SPEED_NORMAL
    • mobi.beyondpod.command.SET_PLAYBACK_SPEED_1
    • mobi.beyondpod.command.SET_PLAYBACK_SPEED_2
    • - use SearchManager.QUERY extra to send the search Query. You can find a list of supported queries by BeyondPod in Quick Play Guide
  • External Player Interface. BeyondPod has a simple infrastructure that allows BeyondPod to integrate better with external players. Generally when launching an external player, BeyondPod sends "Intent.ACTION_VIEW" Intent and provides the path (or url) to the file to be played and the mime type of the file (audio/*, video/* or image/*). BeyondPod will also provide an Intent "extra" named "startPosition" (float) - this is the fraction of the podcast that has been played, and (if the Player supports it) the player should resume from that position. When the external player finishes playing, it can also return a result containing "position" (float) and "duration" (int), extras containing the current position and the duration of the played content as tracked by the external player. This mechanism allows BeyondPod to keep track and resume of the played progress in external players as well as allows BeyondPod to "feed" its internal playlist to the external player. This interface is currently supported by VPlayer video player, available on Android Market.

We have a small test application that illustrates how to controll BeyondPod from external applications and how to receive notifications about what is currently plying. The sample app is avaialble on GitHub.

If you consume mobi.beyondpod.action.PLAYBACK_STATUS event from Tasker, when reading the event extras (like "feed-name", "episode-name" etc.), you may have to replace the "-" with "_" in the parameter name when configuring the Tasker task (for example "feed-name" will become "feed_name", "episode-name" will become "episode_name" etc.).

We will be glad to enhance the existing APIs as needed so please let us know if something can be improved.