Open app on Android phone

we know about netflix because others had already figured it out when we google the app…im not finding much luck for this app you want.

If you can’t figure it out after you try to research create an issue in the android repo and we can probably come up with a command that just launches an app using its launch intent. This command here is really designed to take a user to a specific part of an app and not really to just launch the app. In the meantime you can use the action of the notification to launch the app when you click on the notification, refer to the docs for more details on this.

Folks.
Is there a way to take it to the next level…
My challenge, Tesla app doesn’t deal with navigation (don’t think so).
But if I open Google Maps and “share directions” with the Tesla app, it will forward it to the car and will navigate on the car screen.

Anybody knows how to command “share direction” to the Google Maps after sending the location via…

automation:
  - alias: Search google maps
    trigger:
      ...
    action:
      - service: notify.mobile_app_<your_device_id_here>
        data:
          message: "command_activity"
          title: "geo:0,0?q=1600+Amphitheatre+Parkway%2C+CA"
          data:
            channel: "com.google.android.apps.maps"
            tag: "android.intent.action.VIEW"

as per Notification Commands | Home Assistant Companion Docs

Check the linked Google site in the companion app help site to see what is possible.

You can also just launch an app with command_launch_app as the message and the package_name as data.

See: Notification Commands | Home Assistant Companion Docs

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"
1 Like

excuse me for the ignorance, when trying to add these lines:

- type: weblink
  name: Twitter
  url: "app://com.twitter.android"

I see the attched screen, what am I doing wrong?

make sure you are using the entities card when adding the card

1 Like

I did, but something gets wrong. what should be the correct syntax ?
got it, thanks!!

type: entities
entities:
  - type: weblink
    name: Twitter
    url: "app://com.twitter.android"
1 Like

click on the link and scroll down to the bottom to look at a full example

as a quick example:

type: entities
entities:
  - type: weblink
    name: test
    url: app://test

1 Like

thanks, now I get into trouble launching this app:

I understand I need to go to quite an investigation…

you need to get the package name which you can derive from the URL of the actual item page.

https://play.google.com/store/apps/details?id=com.tranzmate&hl=en_US&gl=US

so after where it says ?id= up until the & so this apps package name is com.tranzmate

Great, Thx!!!

All of a sudden this doesn’t work anymore :

  - service: notify.mobile_app_lm_g710
    data:
      message: command_activity
      title: http://www.netflix.com/browse/
      data:
        channel: com.netflix.mediaclient
        tag: android.intent.action.VIEW

Am I missing something ?

Read the release notes of the companion app.

I was trying to do something similar for the first time so I am not sure why its not working when it was…but I did get this yaml to work to open an app for me (below). Also this link helped me out with the correct syntax (Notification Commands | Home Assistant Companion Docs)
Edit, just noticed this text box is formatting the yaml spacing incorrectly. Use the link to see the correct spacing.

action:

  • service: notify.mobile_app_jeff_phone
    data:
    message: command_launch_app
    data:
    package_name: com.teslamotors.tesla
3 Likes

Thank you Jeff !

For people also looking for this :

  - service: notify.mobile_app_lm_g710
    data:
      message: "command_launch_app"
      data:
        package_name: "com.netflix.mediaclient"

Quick extra tip for anyone who finds this:
If you need to figure out the package name for a specific app, use the Android App, NFC tools.
Task>Add a task>Applications>Application>Click the Android button> This pulls up your app list on your phone> Select App.
Package name will be populated for you to copy and use in Home Assistant.

Probably 10s of other ways to find it, but this is what I found since I setup an NFC tag automation to open the tesla app (and then turn on my garage lights, open the garage door). Then wait until the garage closes and turn off the lights. I tap the tag before I leave the house to wake my tesla (whole other issue) and get going out.

1 Like

The play store URL also contains the package name

1 Like

Anyone know how/if I can send a command to an android wall panel to open VLC and get it to play a particular RTSP stream?

1 Like

I presume you want a camera stream on the wall panel when someone is f.e. at your door ?

I didn’t use VLC for that, but used just a card in home Assistant. When someone is at my door, I navigate to that specific view where the card is located for that device (your wall panel) using browser_mod.

That’s not your question, but maybe a solution :wink:

Thanks for the input. I do that already but find it very jerky, even with a sub (SD not HD) stream. I wanted to see if I could do it using VLC, which is much smoother and by-passes HA.

1 Like