I did read the docs. That is how I have come to try this. I obviously didn’t understand them fully though. I also followed the spotify links but didn’t understand fully the coding as they weren’t specifically referring to the HA app.
The intent, com.spotify.music.MainActivity came from Fully Kiosk which uses intents to launch apps and works from Fully so I guessed it was correct.
I have changed the tag to yours and removed the .MainActivity from the channel.
It still doesn’t work and errors with the same error.
have you any further suggestions?
Thanks
According to the links for spotify you probably need to specify the album or artist. You may need to play around until it actually loads honestly. Make sure the permission is granted as well.
I saw that one of the links were trying to play a track or album but that is not what I would like to do. I just want to launch the app.
The second links asks how to do just that but Spotify support didn’t understand the question so gave a poor answer.
I have seen on other threads where people are using REST as well as Intents from HA to Fully Kiosk to launch Spotify
The intent they are using is com.spotify.music so that must be correct
From the links, the activity is ACTIVITY_VIEW so the tag: android.intent.action.VIEW must be correct as well
When i tried the example intent in the docs (com.google.android.apps.maps) it worked a treat.
So what permissions were you mentioning that I should grant?
I believe its because Spotify requires to receive some data which is why you are seeing the toast message. Its tough to tell what is exactly required per intent but we can at least notify the user when it fails
This opens the sms/messaging app with a prefilled phone number (0123456789) and the message body TEST.
But how do I send it?
I want it all to happen in the background. Is it even possible?
...
tag: "android.intent.action.SENDTO"
...
Gives the same result
Could it be: https://stackoverflow.com/a/13491005/5159168 Now Permissions open your AndroidManifest.xml and add below line <uses-permission android:name="android.permission.SEND_SMS"/> and its done…
Thanks.
But I can’t make it with Tasker either.
I (perhaps just me) can’t send variables to Tasker that is then transferred to the sms.
Like phone number, body. It works if I have a predefined sms to send.
Here’s the script I use to set my alarm. You can use it too, just change name of the service for your phone. It takes hour, minutes, offset and name as parameters, calculates the time to set the alarm at as hour + minutes + offset and then makes the appropriate notification command for sleep as android.
I have an automation which looks at my calendars every night at 10pm, figures out the first event I have the next morning and then sets my alarm 10 minutes before it begins lol
alias: Set Mike's alarm
description: Add an alarm on mike's phone
fields:
hour:
description: Hour for alarm(24-hour clock)
example: 6
minutes:
description: Minutes for alarm
example: 30
offset:
description: Minutes to offset specified time by
example: -10
name:
description: Name/message for alarm
example: Wakeup
sequence:
- service: notify.mobile_app_mikes_phone
data:
message: command_activity
data:
tag: android.intent.action.SET_ALARM
group: >-
{% set pre = 'android.intent.extra.alarm.' %} {% set time =
strptime(hour | string + ':' + minutes | string, '%H:%M') +
timedelta(minutes=offset) %} {% set extras = ['HOUR:' +
time.strftime('%-H'),
'MINUTES:' + time.strftime('%-M'),
'MESSAGE:' + name | regex_replace('[,:]', ''),
'SKIP_UI:true'] %}
{{ pre + extras | join(',' + pre) }}
mode: single
icon: 'mdi:alarm'
I should probably make this script into a blueprint come to think of it. Maybe this weekend.
But I am happy and was going to create something like @Steven_Rollason. Setting my alarm clock according to if I will be going to office, if my wife is working, etc.
The companion docs are correct here. The actual issue is that the example provided is only for Sleep as Android as mentioned and linked in the docs. The example provided by @Steven_Rollason was for the stock google app.
Unfortunately there is no easy way to accurately list and describe everything. Every app and every intent has its own required set of data which is why we mention you’ll have to play around with it to get things right. The examples provided are only an example to show you how it works. This is also considered an advanced feature due to that.
Hi all,
I’m looking for a way to launch the HA app on a specific view, is it possible ?
I saw there are these class names but haven’t found one useful for my purpose.
So now I can have the tablet sense the noise of the door bell through its own microphone via RTSP and the automation that change the view for some time before going back to the normal view amazing!
Best regards,
Mike