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

Hi,

I’m trying to make a phone call directly from the notification I’m using this action but for some reason it doesn’t work, I’m not sure what I’m doing wrong, here is the code I"m using:

service: notify.mobile_app_mousa_phone
data:
  message: command_activity
  data:
    channel: com.google.android.dialer
    tag: android.intent.action.CALL
  title: tel:567767

appreciate any help :slight_smile:

How did you retrieve that intent?

from here:

1 Like

Could it be because of permissions?

Though about that, home assistant app already have the permission to use the phone app.

Also I can use the action to write the number on the dialer:

service: notify.mobile_app_mousa_phone
data:
  message: command_activity
  data:
    channel: com.google.android.dialer
    tag: android.intent.action.DIAL
  title: tel:6767645

with this action I can write the phone number on the dialer I just have to press call to call the number. but I’d like to directly call the number ( without me pressing anything ).

I just tried with Tasker and it worked using call with auto dial.

I don’t have time to test it now but perhaps the intent listener of HA can capture what Tasker does?
Or perhaps you can use Tasker as a man in the middle?

I’m not sure if intent listener of HA can capture what Tasker does.
I prefer to use it in home assistant, I’d like to combine it with actionable notification to call “someone” when a “Trigger” happen.

For example to call home if the main door left open for a certain period of time with no motion around it then I’ll get a notification like in the pic bellow:

so when I press “Make a call” I’ll call home directly to tell them to close the door.

If you looked at the link from Google they explain you have to click call on your own. You’ll need to use tasker to actually achieve this like others mentioned.

When the phone app opens, it displays the phone number but the user must press the Call button to begin the phone call.

And just below it says:

To place a phone call directly, use the ACTION_CALL action and specify a phone number using the URI scheme defined below. When the phone app opens, it begins the phone call; the user does not need to press the Call button.

2 Likes

This what I’m trying to use.

Ah not sure why I missed that, will need to run some tests as we probably need to direct the user to granting the permission first time the command is received. Can someone in here please submit a feature request for this specific intent so we can get it added?

@mousawm ? Or should I do it?

@Hellis81 You can do it if you like

Intent action.CALL does not work. · Issue #2343 · home-assistant/android (github.com)

2 Likes

thanks for filing the request :slight_smile: heres the PR to fix the issue https://github.com/home-assistant/android/pull/2344

2 Likes

So in a feature version we can have a phone call a different phone, wait for trigger on the other phones call sensor that they answered the call, and have a TTS message be read over the phone line.

So you leave the door open or unlocked, then HA calls you and tells you you left the door open.
That’s pretty cool.

1 Like

I understand the call part, but how does you send the tts message later?

I’m interested in that also

You can just make the phone that called speak a TTS message using a command notification.

Or have a phone laying next to a Google home/Alexa with a prepaid card and TTS from the GH/Alexa.