Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow sending broadcast intents to other apps via notification #1129

Merged

Conversation

dshokouhi
Copy link
Member

@dshokouhi dshokouhi commented Oct 31, 2020

Fixes: #1020

We must set message: command_broadcast_intent and the title must contain the Action and channel must contain the Package name.

Format:

message: command_broadcast_intent
title: ACTION
data:
  channel: PACKAGE_NAME

Tested with sleep as android API: https://docs.sleep.urbandroid.org/devs/intent_api.html#action-intents-to-control-sleep

Example:

message: command_broadcast_intent
title: com.urbandroid.sleep.alarmclock.STOP_SLEEP_TRACK
data:
  channel: com.urbandroid.sleep

If title or channel is not provided we post the notification to the device as normal, otherwise if there is another failure we show a toast.

Docs: home-assistant/companion.home-assistant#376
FCM: pending

Copy link
Collaborator

@JBassett JBassett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than overloading title to have both package and action lets break it up into 2 fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow sending Intent via notifications
4 participants