Launching a widget and shortcut on my android phone using an automation?

I would like the ability to use an automation to do two things:

  1. initiate a widget on my android phone
  2. open a shortcut on my android phone

basically I would like the podcast addict app to check for new podcasts and then launch to the latest episodes areas of the app

podcast addict can create a widget to refresh the episode feed and has a shortcut that can launch directly to the ‘Recent episodes’ part of the app

See below for more context:

(top center - podcast addict normal app icon, bottom left - podcast addict shortcut to open the latest episodes / ‘Recent episodes’ view in the app, bottom right - podcast addict widget to refresh the feed of episodes)

Sadly it doesn’t seem like there is a different name under version when looking at the details of the shortcut.

I believe the packname is: com.bambuna.podcastaddict

I know it’s possible using the companion app to launch an app normally using code like what is shown below but I am uncertain about starting a widget and / or a specific app shortcut. Maybe somehow using the intent code example from: Notification Commands | Home Assistant Companion Docs ?

Thank you in advance for the help.

automation:
  - alias: Launch app
    trigger:
      ...
    action:
      - service: notify.mobile_app_<your_device_id_here>
        data:
          message: "command_launch_app"
          data:
            package_name: "com.twitter.android"

If anyone in the future is looking to the solution to this:

Go to Latest Episode Screen:

alias: Podcast Addict Latest
description: Podcast Addict Latest List
trigger: []
condition: []
action:
  - service: notify.mobile_app_pixel_8_pro
    data:
      message: command_broadcast_intent
      data:
        intent_package_name: com.bambuna.podcastaddict
        intent_class_name: com.bambuna.podcastaddict.receiver.PodcastAddictPlayerReceiver
        intent_action: com.bambuna.podcastaddict.opennewepisodes

Refresh List of Podcasts:

alias: Podcast Addict Automation Refresh
description: Refresh Podcast Addict List
trigger: []
condition: []
action:
  - service: notify.mobile_app_pixel_8_pro
    data:
      message: command_broadcast_intent
      data:
        intent_package_name: com.bambuna.podcastaddict
        intent_class_name: com.bambuna.podcastaddict.receiver.PodcastAddictBroadcastReceiver
        intent_action: com.bambuna.podcastaddict.service.update

You will have to update the name of the device after mobile_app_XXXX

1 Like

how did you determine the class name and action?

1 Like