Fully Kiosk: Launch local Android apps from your HA dashboard

Fully Kiosk is a great solution for wall-mounted tablets running Lovelace dashboards. Alongside Home Assistant, it can be useful to run local Android apps, for example to control a device which is not yet integrated into Home Assistant.

There are a few different methods of launching local Android apps from a Lovelace dashboard running in Fully Kiosk. You can use Android intents, the Fully Kiosk JavaScript API or the Fully Kiosk REST API.

JavaScript and REST API docs are here. Both APIs are Plus features, but Fully Kiosk is well worth paying for anyway.

For the JavaScript and REST API methods, you’ll need the package name of the Android app. There are a few simple ways to find the names. I’ll cover them at the end of the post.

For the Android Intent method, you’ll need to know the entire Android intent, not just the package name. It is more difficult to track down the correct intent to use than it is to find package names. You’ll find a couple of tips at the end of the post.

There are three key considerations when choosing the method of launching an local Android app:

  1. Is any Home Assistant configuration required outside of the Lovelace card config?
  2. Does the method open a new tab in Fully Kiosk? If so, you’ll have to press back twice on your Android device to get back to Fully after using the local Android app.
  3. Will the same configuration work on any Android device with the app installed, or do you have to know the IP address of the device that’s in use?

Here is a sampling of methods using the Android Chrome app as an example.

ANDROID INTENT

Con: Opens a new tab when used as a tap_action, for example in a Button Card or Picture Card.

Con: You need to know the entire Android intent, not just the package name.

Note: Works with the Free version of Fully Kiosk.

Pro: Does not open a new tab with an Entities Card, as in the example below.

Pro: Requires no configuration outside of the Lovelace card.

Pro: Works on any device with the local Android app installed.

entities:
  - icon: 'mdi:web'
    name: Chrome
    type: weblink
    url: 'intent:#Intent;component=com.android.chrome/.MainActivity;end'
type: entities

To use this method, replace the intent URL with the intent for the app that you want to launch. You can often just replace com.android.chrome with the the package name of your app, but it doesn’t work for all apps. See the end of the post.

JAVASCRIPT API

Con: Opens a new tab when used as a tap_action, for example in a Button Card or Picture Card. However, this method does not open a new tab if used in a template in a custom button card. See example below.

Note: Requires the Plus version of Fully Kiosk.

Pro: Does not open a new tab with an Entities Card, as in the example below.

Pro: Requires no configuration outside of the Lovelace card.

Pro: Works on any device with the local Android app installed.

entities:
  - icon: 'mdi:web'
    name: Chrome
    type: weblink
    url: 'javascript:fully.startApplication(''com.android.chrome'')'
type: entities

To use this method, pay for the Plus version of Fully Kiosk, then enable the JavaScript API: In Fully Kiosk go to Settings/Advance Web Settings, then turn on Enable JavaScript interface (PLUS).

Replace com.android.chrome with the name of the package you want to launch.

If you want to use the JavaScript method with a button card but without opening a new tab, you can instead use it in a template in a custom button card as below:

type: 'custom:button-card'
name: Chrome
icon: 'mdi:web'
tap_action:
  action: javascript
  launch: |
    [[[
      fully.startApplication('com.android.chrome')
    ]]]

Note that javascript and launch are just placeholders with no specific meaning. You could have any values that are not real options there. For example, this would also work:

...
tap_action:
  action: orange
  purple: |
    [[[
...

REST API

Note: Requires the Plus version of Fully Kiosk.

Con: Requires configuration outside of the Lovelace card.

Con: You must know the IP address of the Android device being used.

Pro: Never opens a new tab when used with any Lovelace or custom card I’ve tried.

Pro: Very flexible. Can be used with any card that can call a service.

icon: 'mdi:web'
name: Chrome
tap_action:
  action: call-service
  service: rest_command.your_rest_command_that_launches_chrome
type: button

To use this method, pay for the Plus version of Fully Kiosk, then enable the REST API in Fully Kiosk:

  1. Go to Settings/Remote Administration (PLUS)
  2. Turn on Enable Remote Administration
  3. Set a Remote Admin Password - Use your password in place of [pass] in the url above. Do not include the brackets.
  4. Turn on Remote Admin from Local Network - Note the IP address. It goes in place of [ip-address] in the URL in the example below (You should set the address as a static IP on your router.)

Next, create a rest_command corresponding to the app you want to launch and the device that you want to launch it on.

The REST command format for launching an app using the Fully Kiosk REST API is:

http://[ip-address]:2323/?cmd=startApplication&package=[pkg]&password=[pass]

[ip-address] = IP address of the Android device you want to launch the app on. Don’t include the brackets.
[pkg] = Android app package name, for example com.android.chrome. Don’t include the brackets.
[pass] = Your Fully Kiosk API password. Don’t include the brackets.

Edit configuration.yaml, for example to launch Chrome:

rest_command:
  your_rest_command_that_launches_chrome:
    url: http://192.168.xxx.xxx:2323/?cmd=startApplication&package=com.android.chrome&password=your_password
    method: POST

Restart Home Assistant, and you should be good to go.

If you have more than one Android device that you want to launch apps on, there are a few different ways you can manage it.

I’m currently using a template with the custom button card as follows.

  1. I’ve created a Home Assistant user for each device.

  2. The custom button card checks which user is initiating the action and calls the appropriate rest_command.

    icon: 'mdi:web'
    name: Chrome
    tap_action:
      action: call-service
      service: |
        [[[
          if ( user.name == 'TOPFLOORTAB' )
            return 'rest_command.chrome_topfloortab_launch';    
          else
            return 'rest_command.chrome_groundfloortab_launch';
        ]]]
    type: 'custom:button-card'
    
  3. There is a REST command for each device:

    rest_command:
      chrome_groundfloortab_launch:
        url: http://192.168.xxx.xxx:2323/?cmd=startApplication&package=com.android.chrome&password=MyPassword
        method: POST
      chrome_topfloortab_launch:
        url: http://192.168.xxx.yyy:2323/?cmd=startApplication&package=com.android.chrome&password=MyPassword
        method: POST
    

Instead of using a custom card and templates to differentiate between users/devices, you could instead create separate Lovelace dashboards for each device.

TO STOP FULLY KIOSK FROM REFRESHING THE PAGE WHEN YOU GO BACK FROM AN APP

Simply go to Settings/Web Auto Reload and turn all settings off.

FINDING PACKAGE NAMES

Finding package names is easy. Here are three ways to do it:

  1. To find the package name of an installed app from within Fully Kiosk, go to Settings/Universal Launcher/Select Items to Show and click Add Application. You’ll see a list of installed apps with the package name underneath each.

  2. You can also see package names in the app’s URL if you open the Play Store in a browser on a computer:
    image

  3. You can also use an app on your Android device, such as this one.

FINDING INTENTS

Intents can be more difficult to track down that package names.

  1. Google is the first place to start, e.g., try searching “android intent for Spotify”.

  2. Some apps such as Activity Launcher list available intents for all apps. With Activity Launcher, you can try out the various intents for an app to find the one that serves your purpose. You may be able to initiate a specific activity in an app in addition to launching it.

16 Likes

Hello,

thank you for the good instructions.
Does anyone have an idea, I would like to go to a website in the Fully Browser if an event was triggered:

For example:
Alarm system is activated, I’m coming home (device tracker), now I have 30 seconds to deactivate the alarm system, the website with the alarm panel is called up and displayed on the tablet in the browser.
My system works with the REST interface, but I can’t get the website …
I need a tip for the URL.

Greetings from Germany,
Stephan

Hello, ate you still using it? I’ve tried the Chrome launch example as-is (except the indentation). It creates a link, but when I touch it, I get half Android logo:

Maybe something has changed and we need a different way of opening intents…

EDIT: I see, there is a text (black text in black background) on the page:

Thank you for this. I was able to use it to open apps using the restful command method but for other purposes I also wish to be able to send intents. I cannot get it to launch my app and its activity. The button just does nothing when I tap on it on my tablet. I am using the code in your example with Chrome.
Any ideas?

I am not quite sure I got what was written in the OP…

All I want to know is… can I basically “embed” an Android app in the Lovelace UI?

Would be great if I could embed the Amcrest video doorbell app so that I can answer straight from HA!

What do you mean by “embedding”? If you want to create a rectangle in HA containing some other application, I am afraid it is not possible. If you want just a button that opens some other app (or maybe a specific activity inside other app), it should be possible.

1 Like

If you want to create a rectangle in HA containing some other application, I am afraid it is not possible.

Exactly what I meant thanks for clearing things out. :slightly_frowning_face:

I made a REST command to launch an app on a tablet display but it is not working. I can ping the tablet from HA, and nmap shows port 2323 open. I have the paid version of Fully, and remote admin is switched on. But the Start App command does nothing at all.

What I am trying to do is this:
I have a smart doorbell with camera, but it cant be integrated with HA. I can detect when somebody presses the bell by forwarding notifications from my mobile, I can also have the camera app running on the tablet hidden by the HA GUI. What I would like to do is simply, when the doorbell notification triggers, bring the camera view to the front, on top of the HA GUI, then after a minute or so, bring HA to the front again. Basically just changing the Z-order of the two windows on the tablet. Is it possible to do this ? I was testing the REST command to try to determinee whether “starting” an already running application would cause it to appear in the foreground, but since the command did nothing, I was unable to test this.

1 Like

Did you try with direct http in browser? Open your browser and as url enter:
http://192.168.x.y:2323 (192.168.x.y is IP of your fully tablet).

It should ask you for password. Did you enter password in fully → remote admin?
If you get above page then remote access works, then your rest sensor can be wrong.
How did you create rest sensor? Here is my rest sensor for open chrome app on my tablet:

rest_command:
  kiosk_tablet_run_chrome:
    url: "http://192.168.x.y:2323/?cmd=startApplication&package=com.android.chrome&password=<yourpassword>"

Turns out i had a typo in the URL, after correcting that it works !

hi salsaman, im facing the same problem how did you bring the app to the background after a minute and showing the dashboard again. i need to open the amcrest app in the background otherwise it doesnt show the right view.

Hi,

is it correct that you managed to somehow “embed” the Amcrest app being therefore able to answer to the doorbell while having the Lovelace UI running in the background?? :astonished:

If yes can you please share you how to replicate this as I was looking for this for AGES?

This is great. I’ve now got a button my wall mounted dashboard (picture_elements card) that opens VLC. I didn’t need to dive into the rest command as I already had a Service that does it (Browser_mod?).

  - type: icon
    icon: mdi:traffic-cone
    tap_action:
      action: call-service
      service: fullykiosk.start_application
      data:
        entity_id: media_player.fire_tablet_media_player
        application: org.videolan.vlc
    style:
      top: 90%
      left: 95%
      '--mdc-icon-size': 50px
      color: red

What I’d like to do now is have an automation to open VLC and start an RSTP stream. Is it possible to add a ‘command line option’ that does this?

Edit: I’ve been told by the FK team that to pass a stream parameter to an app in Android I need to use the load_url service. So I now have:

service: fullykiosk.load_url
data:
  entity_id: media_player.fire_tablet_media_player
  url: intent:#Intent;launchFlags=0x10000000;component=org.videolan.vlc/org.videolan.vlc.StartActivity;end

which is just another way of loading the VLC app. I just need to find the additional content to add to my Intent that will tell VLC to start displaying a particular rtsp stream.

OK before I am going to waste time and fly into a rage lol can someone here please tell me if I can achieve to have my doorbell app opening when someone presses the bell and exiting it once I close the “call”? :sweat_smile:

There may be other ways, but off the top of my head:

  1. Assuming that Home Assistant knows when your doorbell rings, create an automation that is triggered by the ring to send a REST command (as with the Chrome example in my original post, obviously replacing the Chrome intent with one for your doorbell app.) This is nothing to do with the dashboard. Just call the REST service from your automation.

…then one of the following…

  1. Simply press back or home when done with the doorbell call if Fully Kiosk is running in kiosk mode.
  2. If Home Assistant is somehow aware that the doorbell call has ended (a sensor state change maybe?), create an automation that is triggered by that change which sends the REST command to bring Fully to the foreground.
  3. Add a reasonable delay–say 90 seconds?–to your automation from point 1 after it opens the doorbell app, then send the REST command to bring Fully to the foreground.

The REST command to use for 3 or 4 above is:

rest_command:
  fully_kiosk_to_foreground:
    url: http://192.168.xxx.xxx:2323/?cmd=toForeground&password=MyPassword
    method: POST
1 Like

I don’t use VLC, so I can’t say for sure. But, you can find VLC intent options here:
https://wiki.videolan.org/Android_Player_Intents/#Open_a_media_with_VLC_Player

I’d be curious about the solution if you make it work.

Cheers I am going to see what I can achieve with your example! :smiley:

Btw I’m going to use the Amcrest app (if that makes any difference).

@Cr4z33 Good luck. I don’t have any experience with the Amcrest doorbell. But, see the doorbell automation example at the bottom of this page. You will be able to use that same event as ther trigger to launch the app.

There might also be an event to indicate that a doorbell call has finished which you could use as a trigger for option 3 above. Listen for event type amcrest in Developer Tools/Events while making a test doorbell call in order to see if there is a call completed or similar event is fired.

1 Like

I will be using DahuaVTO2MQTT + Dahua integrations as they work way better than the Amcrest integration. :wink:

1 Like

I got advice from the good people at Fully Kiosk and got this to work (although the VLC often goes to the background with Fully Kiosk coming to the foreground. I have then to pick VLC from the list of open apps. I’m still working on that one)

action:
  - service: fullykiosk.load_url
    data:
      entity_id: media_player.fire_tablet_media_player
      url: >-
        intent://user:[email protected]:554/Streaming/Channels/101#Intent;action=android.intent.action.VIEW;scheme=rtsp;component=org.videolan.vlc/org.videolan.vlc.StartActivity;end

1 Like