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

one thing you can try to do is to look at the ADB logs when you perform the action in the app you want to use and see if an intent shows up in the logs. If there is one it will be in the device logs. You’ll need to use actual ADB logcat as the app configuration logs are only for the HA app. You can also download an APK manifest viewer and look at the manifest to see if any are handled.

I tried to open a manifest viewer but there was nothing in it, I couldn’t debug my device… I was trying in trial and error but I gave up heheh on my phone there is a widget that was created by the smartlife app that when clicked opens the app from smart life on camera X and I wanted to make the home assistant app send the notification to open it but I’m not succeeding at all. Any other ideas?

Inspect adb logs like I mentioned above. I don’t use that app so your going to have to do more trial and error. Find another manifest viewer app that works too.

I’m also looking to do this, it works for the buds earphones, but not watch. I guess it’s because it doesn’t report battery percentage “normally”, and uses something else to get it through the wearables app?

As shown here, it doesn’t report battery percentage in bluetooth devices.

Just wanted to give everyone an update here. We have added a new parameter to both command_broadcast_intent and command_activity. You can now use intent_class_name to specify the class/component name. Some intents may fail without this parameter so if you were trying to get a command to work this may do the trick!

I’m trying to get just a simple alarm to set on my phone, but I can’t seem to work out / understand the docs… can someone help me? I have tried:

service: notify.mobile_app_nathaniel_mobile
data:
  message: command_activity
  data:
    tag: android.intent.action.SET_ALARM
    group: "EXTRA_HOUR:19,EXTRA_MINUTES:30,EXTRA_MESSAGE:Leave,EXTRA_RINGTONE:Roller Disco,EXTRA_SKIP_UI:true"

But this doesn’t seem to do anything much

I have the exact same but not ringtone.

In node red I currently use:

{
    "message": "command_activity",
    "data":{
        "tag": "android.intent.action.SET_ALARM",
        "group":"android.intent.extra.alarm.HOUR:" & msg.hour & ",android.intent.extra.alarm.MINUTES:" & msg.minutes & ",android.intent.extra.alarm.MESSAGE:Wake UP!,android.intent.extra.alarm.SKIP_UI:true,android.intent.extra.alarm.VIBRATE:false",
        "ttl": 0,
        "priority": "high"
    }
}

It seems to be the same as yours.
Can the phone receive a normal text notification?

ahhh… that helped me work it out… yeah the phone can get normal text notifications.

service: notify.mobile_app_nathaniel_mobile
data:
  message: command_activity
  data:
    tag: android.intent.action.SET_ALARM
    group: "android.intent.extra.alarm.HOUR:16,android.intent.extra.alarm.MINUTES:49,android.intent.extra.alarm.MESSAGE:Leave,android.intent.extra.alarm.RINGTONE:Roller Disco,android.intent.extra.alarm.SKIP_UI:true"

Now all I have to do it somehow work out how to create the alarm if it happens on that day (cuz it can happen any time of day some days no alarms at all) and how to get the right hour and min into the fields to set it correctly.
It would be SUPER nice if someone bothered to add a “delete alarm” or “delete/clear all alarms on device”, because if something changes you want to do that automatically… and just the sleep as android methord of turning them off isn’t exactly helpfull either.

I have looked at the delete alarm. It’s a bit complicated and I’m not sure it’s even possible with notification messages.
To delete you first need to use a function to search for the alarm, then pass that to the delete function.
I have no clue how that command would look in a notification style.

What was wrong with your command? I can’t see what is wrong.
Edit now I see. android.intent.extra.alarm.HOUR

android.intent.extra.alarm.HOUR:16

opposed to

EXTRA_HOUR:16

hey @dshokouhi or someone else

This is verry usefull, upon receving a notification… but is it also possible upon a action in the notification to unlock the screen on android? because if its not unlocked, the app doesnt open

Did you make sure to grant the app draw over other apps permission? Mine works fine and whatever activity I tell it to open it does.

yeah, those permission are granted

so i get a push notiftcation, but at that moment its still locked, then i open the app with the action defined … but nothing happens (untill i unlock)

if i do the same, i get notification, i unlock first, then click the action, then the app opens instantly

i have screen lock on my phone but my commands work fine, I imagine this might be a device setting on your end.

What app do you open with an action for example? Maybe be it’s also app related?

the app is sleep as android which also has the draw over other apps permission. And its not with an action from a notification, that is not what this thread is about. This thread is for a notification command to be processed on the device without the user pressing a button. It just happens.

Yeah, I also tried without interaction, but it doesn’t unlock my device

Strange

Do you want it to unlock your device?
I don’t think that is allowed.

Yeah, I want to open my intercom app

Does anyone have the intents for DS Cam (synology) ?