Android Intents - Sending & Receiving List (Starting Activities too!)

As I mentioned it shows notifications for everything rather than doing the actions. Only documented bluetooth too keep it simple and missed the < Android12 note

e.g. command_dnd (Android 6+)

service: notify.mobile_app_kev_s_galaxy_s23_ultra
data:
    message: "command_dnd"
    data:
      command: "priority_only"

Request Location updates

service: notify.mobile_app_kev_s_galaxy_s23_ultra
data:
    message: "request_location_update"

Changing the screen brightness

service: notify.mobile_app_kev_s_galaxy_s23_ultra
data:
  message: "command_screen_brightness_level"
  data:
    command: 50

or command activity (no version note)

service: notify.mobile_app_kev_s_galaxy_s23_ultra
data:
  message: "command_activity"
  data:
    intent_package_name: "com.google.android.apps.maps"
    intent_action: "android.intent.action.VIEW"
    intent_uri: "google.navigation:q=arbys"

The only one I can find which doesn’t show the message as a message is clear_notification (with or without the quotes)

service: notify.mobile_app_kev_s_galaxy_s23_ultra
data:
  message: "clear_notification"
  data:
    channel: Formula 1
    tag: Formula-1

All result in the notification showing the command/request and not performing the action:-

Log for the DND one.

04-16 12:00:40.221 9905 9905 I NotificationManager: io.homeassistant.companion.android: notify(-426710902, null, Notification(channel=general shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x10 color=0
xff03a9f4 vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
04-16 12:00:40.458 2538 2538 D NotificationReminder: addNotificationRecord record io.homeassistant.companion.android
04-16 12:00:40.469 4535 4535 I HoneySpace.NotificationListener: onNotificationPosted io.homeassistant.companion.android: 0|io.homeassistant.companion.android|-426710902|null|10372: 0
04-16 12:00:40.469 4535 4535 I HoneySpace.BadgeDataSourceImpl: Get notification count. PackageKey(packageName=io.homeassistant.companion.android, user=UserHandle{0}) - forceBadgeCount: false, notification listener: 1, badge prov
ider: 0
04-16 12:00:40.469 3963 3963 D InterruptionStateProvider: no Heads up : edgelighting enabled app. 0|io.homeassistant.companion.android|-426710902|null|10372
04-16 12:00:40.470 4535 8428 I HoneySpace.PackageEventOperator: [AppsEdgePanel.ViewModel] badge count is updated. io.homeassistant.companion.android/.launch.LaunchActivity#UserHandle{0}|4 : 1
04-16 12:00:40.471 3963 3963 D InterruptionStateProvider: no Heads up : edgelighting enabled app. 0|io.homeassistant.companion.android|-426710902|null|10372
04-16 12:00:40.567 3963 3963 D S.S.N. : entryViewBound parent :0|io.homeassistant.companion.android|-426710902|null|10372

Argh, found it - * These commands will always work, even when other commands are disabled. gave a hint there was something else that needed enabling… But I’d already gone through all the Sensors and other Settings on the Companion App, not realising the key toggle (which is not mentioned by name in the documentation) is actually under the “Servers & Devices” selection - select your server and turn on “Remotely Control Apps and Devices”

1 Like

I get a new alarm created on my Pixel 7 but doesn’t seem to get the DAYS option working. Also I actually just want to activate / non activate my already existing alarms that are available in my phone (with a name) but the system only creates a new one on the same time…
Any suggestions?

Trying to create an alarm for if there is an emergency at home but i get an error when i call service on my phone " unable to send activity, please check intent"

service: notify.mobile_app_luffy1987
data:
  message: command_activity
  data:
    intent_package_name: com.google.android.deskclock
    intent_action: android.intent.action.SET_TIMER
    intent_extras: 'android.intent.extra.alarm.SKIP_UI:true,android.intent.extra.alarm.LENGTH:1'

do you have the google clock app installed?

https://play.google.com/store/apps/details?id=com.google.android.deskclock&hl=en_US

Thank you i forgot to download the app first lol.
it worked great, I’m trying to add a priority message with also like “FIRE, FIRE, FIRE. CALL 911”
how would that be set up?

I’m trying to send a command to have a phone with VLC installed play an mp3 on the internal storage but can’t get it to play. My current workings…

service: notify.mobile_app_pixel_4a
data:
  message: command_activity
  data:
    intent_action: android.intent.action.VIEW
    intent_package_name: org.videolan.vlc
    intent_class_name: org.videolan.vlc.StartActivity
    intent_uri: "file:///storage/emulated/0/Music/soul.mp3"
    intent_type: "audio/*"

I’ve double-checked the file path and believe I have all the necessary permissions enabled but nothing happens, no toasts shown and the app doesn’t start.

In terms of testing what other commands work…

service: notify.mobile_app_pixel_4a
data:
  message: command_launch_app
  data:
    package_name: org.videolan.vlc

Successfully launches vlc.

service: notify.mobile_app_pixel_4a
data:
  message: command_activity
  data:
    intent_action: android.intent.action.VIEW
    intent_package_name: org.videolan.vlc
    intent_class_name: org.videolan.vlc.gui.video.VideoPlayerActivity
    intent_uri: "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    intent_type: "video/*"

Will start vlc, and reach the player screen, but shows a toast that begins The location https://rr7---sn-8pgbpohxqp5-ac5d.googlevideo.co... and remains unplayed.

Any ideas on why the first command is failing?