DIY-Actions/Triggers: Start Activity, General Broadcast, ...
Moderator: Martin
DIY-Actions/Triggers: Start Activity, General Broadcast, ...
Hi,
Many actions can be added by yourself using the actions Start Activity, Send Broadcast and even triggers using trigger General Broadcast or UI Event.
The goal of this post is to collect actions that are either too device specific to include in Automagic, depend on third party apps not installed on most devices or I didn't have the time to include in Automagic yet.
Feel free to add more actions and variations of already listed actions by replying to this post. Optionally also include a link to a published flow that shows how the feature can be used.
Please also add a link to the third party app when the action requires one (link to Google Play when available).
Thanks!
Martin
Not all actions work on all devices/Android versions
Action Start Activity
Start a skype audio call (requires Skype: Google Play)
Action: android.intent.action.VIEW
Data URI: skype:echo123?call (replace echo123 with the Skype contact name)
Start a skype video call (requires Skype: Google Play)
Action: android.intent.action.VIEW
Data URI: skype:echo123?call&video=true (replace echo123 with the Skype contact name)
Start a skype chat (requires Skype: Google Play)
Action: android.intent.action.VIEW
Data URI: skype:echo123?chat (replace echo123 with the Skype contact name)
Open the SMS app with the defined recipient and message without sending the SMS.
Action: android.intent.action.VIEW
Data URI: sms:1234567 (replace 1234567 with the actual phone number)
Extras: putString("sms_body", "SMS text")
Compose an MMS with image, recipient and message without sending the MMS.
Action: android.intent.action.SEND
Explicit Component: checked
Package Name: com.android.mms
Extras:
putString("address", "1234567");
putString("sms_body", "MMS text");
putUri("android.intent.extra.STREAM", "file:///mnt/sdcard/test.png");
Start an app to compose a mail with some predefined fields.
Action: android.intent.action.SEND
Data MIME Type: text/plain
Extras:
putString("android.intent.extra.SUBJECT", "Subject text");
putString("android.intent.extra.TEXT", "Mail body");
putStringArray("android.intent.extra.EMAIL", newList("recipient1", "recipient2"));
putStringArray("android.intent.extra.CC", newList("ccrecipient1", "ccrecipient2"));
putStringArray("android.intent.extra.BCC", newList("bccrecipient1", "bccrecipient2"));
Execute a web search.
Action: android.intent.action.WEB_SEARCH
Extras: putString("query", "what's the time?");
Take a picture using the camera app and store in the specified file (manual operation required).
Action: android.media.action.IMAGE_CAPTURE
or
Action: android.media.action.IMAGE_CAPTURE_SECURE (Android 4.2+ when screen is locked)
Extras: putUri("output", "file://mnt/sdcard/test.jpg");
Action Send Broadcast
Ask the operating system to close system dialogs (like power off menu).
Action: android.intent.action.CLOSE_SYSTEM_DIALOGS
Trigger General Broadcast
The current time has changed. Sent every minute by the system when the system is awake.
Action: android.intent.action.TIME_TICK
The date of the device has changed.
Action: android.intent.action.DATE_CHANGED
The device language has changed.
Action: android.intent.action.LOCALE_CHANGED
WiFi signal strength changed (usually only reported by the system when the display is turned on).
Action: android.net.wifi.RSSI_CHANGED
Access Intent Extras: value=getInt("newRssi", 0);
Ringer mode changed.
Action: android.media.RINGER_MODE_CHANGED
Access Intent Extras: ringer_mode=getInt("android.media.EXTRA_RINGER_MODE", 0); (0=Silent, 1=Vibrate, 2=Normal)
Location providers (GPS/network) enabled/disabled. (use condition Location Provider Enabled: xyz to check if GPS or network is enabled).
Action: android.location.PROVIDERS_CHANGED
Wallpaper has changed.
Action: android.intent.action.WALLPAPER_CHANGED
Trigger UI Event
A Google Now voice search was executed. The search term can be accessed in the flow in variable text.
Event Type: Text selection changed
Package Name: com.google.android.googlequicksearchbox
Text: leave empty
Many actions can be added by yourself using the actions Start Activity, Send Broadcast and even triggers using trigger General Broadcast or UI Event.
The goal of this post is to collect actions that are either too device specific to include in Automagic, depend on third party apps not installed on most devices or I didn't have the time to include in Automagic yet.
Feel free to add more actions and variations of already listed actions by replying to this post. Optionally also include a link to a published flow that shows how the feature can be used.
Please also add a link to the third party app when the action requires one (link to Google Play when available).
Thanks!
Martin
Not all actions work on all devices/Android versions
Action Start Activity
Start a skype audio call (requires Skype: Google Play)
Action: android.intent.action.VIEW
Data URI: skype:echo123?call (replace echo123 with the Skype contact name)
Start a skype video call (requires Skype: Google Play)
Action: android.intent.action.VIEW
Data URI: skype:echo123?call&video=true (replace echo123 with the Skype contact name)
Start a skype chat (requires Skype: Google Play)
Action: android.intent.action.VIEW
Data URI: skype:echo123?chat (replace echo123 with the Skype contact name)
Open the SMS app with the defined recipient and message without sending the SMS.
Action: android.intent.action.VIEW
Data URI: sms:1234567 (replace 1234567 with the actual phone number)
Extras: putString("sms_body", "SMS text")
Compose an MMS with image, recipient and message without sending the MMS.
Action: android.intent.action.SEND
Explicit Component: checked
Package Name: com.android.mms
Extras:
putString("address", "1234567");
putString("sms_body", "MMS text");
putUri("android.intent.extra.STREAM", "file:///mnt/sdcard/test.png");
Start an app to compose a mail with some predefined fields.
Action: android.intent.action.SEND
Data MIME Type: text/plain
Extras:
putString("android.intent.extra.SUBJECT", "Subject text");
putString("android.intent.extra.TEXT", "Mail body");
putStringArray("android.intent.extra.EMAIL", newList("recipient1", "recipient2"));
putStringArray("android.intent.extra.CC", newList("ccrecipient1", "ccrecipient2"));
putStringArray("android.intent.extra.BCC", newList("bccrecipient1", "bccrecipient2"));
Execute a web search.
Action: android.intent.action.WEB_SEARCH
Extras: putString("query", "what's the time?");
Take a picture using the camera app and store in the specified file (manual operation required).
Action: android.media.action.IMAGE_CAPTURE
or
Action: android.media.action.IMAGE_CAPTURE_SECURE (Android 4.2+ when screen is locked)
Extras: putUri("output", "file://mnt/sdcard/test.jpg");
Action Send Broadcast
Ask the operating system to close system dialogs (like power off menu).
Action: android.intent.action.CLOSE_SYSTEM_DIALOGS
Trigger General Broadcast
The current time has changed. Sent every minute by the system when the system is awake.
Action: android.intent.action.TIME_TICK
The date of the device has changed.
Action: android.intent.action.DATE_CHANGED
The device language has changed.
Action: android.intent.action.LOCALE_CHANGED
WiFi signal strength changed (usually only reported by the system when the display is turned on).
Action: android.net.wifi.RSSI_CHANGED
Access Intent Extras: value=getInt("newRssi", 0);
Ringer mode changed.
Action: android.media.RINGER_MODE_CHANGED
Access Intent Extras: ringer_mode=getInt("android.media.EXTRA_RINGER_MODE", 0); (0=Silent, 1=Vibrate, 2=Normal)
Location providers (GPS/network) enabled/disabled. (use condition Location Provider Enabled: xyz to check if GPS or network is enabled).
Action: android.location.PROVIDERS_CHANGED
Wallpaper has changed.
Action: android.intent.action.WALLPAPER_CHANGED
Trigger UI Event
A Google Now voice search was executed. The search term can be accessed in the flow in variable text.
Event Type: Text selection changed
Package Name: com.google.android.googlequicksearchbox
Text: leave empty
Re: DIY-Actions/Triggers: Start Activity, General Broadcast
How do we find these things on our own? I'd love to find a way to make MediaDog sync with my server when I connect to wifi at home...
Re: DIY-Actions/Triggers: Start Activity, General Broadcast
Difficult to answer since it depends on a case by case basis.
The official Android intents are documented in the developer documentation.
A good starting point is the documentation of the class Intent itself:
http://developer.android.com/reference/ ... ntent.html
some bluetooth intents are documented here:
http://developer.android.com/reference/ ... apter.html scroll down to the list of actions.
some USB device intents:
http://developer.android.com/reference/ ... nager.html
Some of the intents require special permissions not available in Automagic so you will not be able to receive every listed intent.
OpenIntents has a registry of intents used by third-party apps:
http://www.openintents.org/en/intentstable
You can also directly contact the developers of a third-party app when they don't publish the intents on their website or directly check the source code when the app is available on a public repository like GitHub.
The official Android intents are documented in the developer documentation.
A good starting point is the documentation of the class Intent itself:
http://developer.android.com/reference/ ... ntent.html
some bluetooth intents are documented here:
http://developer.android.com/reference/ ... apter.html scroll down to the list of actions.
some USB device intents:
http://developer.android.com/reference/ ... nager.html
Some of the intents require special permissions not available in Automagic so you will not be able to receive every listed intent.
OpenIntents has a registry of intents used by third-party apps:
http://www.openintents.org/en/intentstable
You can also directly contact the developers of a third-party app when they don't publish the intents on their website or directly check the source code when the app is available on a public repository like GitHub.
Re: DIY-Actions/Triggers: Start Activity, General Broadcast
(There may be a simpler method for this)
Pull an application to foreground: (should be running in background to work properly)
START ACTIVITY:
Action : android.intent.action.MAIN
Category list : android.intent.category.LAUNCHER
Explicit Component is checked
Package name & Class name : your application you want to pull to foreground
Install an APK file:
START ACTIVITY:
Action : android.intent.action.VIEW
Data URI: file:///mnt/sdcard/Download/sample.apk
Data MIME type: application/vnd.android.package-archive
Pull an application to foreground: (should be running in background to work properly)
START ACTIVITY:
Action : android.intent.action.MAIN
Category list : android.intent.category.LAUNCHER
Explicit Component is checked
Package name & Class name : your application you want to pull to foreground
Install an APK file:
START ACTIVITY:
Action : android.intent.action.VIEW
Data URI: file:///mnt/sdcard/Download/sample.apk
Data MIME type: application/vnd.android.package-archive
-
- Posts: 12
- Joined: 02 Dec 2013 22:35
Re: DIY-Actions/Triggers: Start Activity, General Broadcast
Hi Martin,
what about a documentation of Automagic intents?
Thinking that Liama manages cell based locations better than Automagic I would like to combine these apps and trigger Automagic from Liama calling Automagic to start a specific Flow/Shortcut.
Cheers
Stefan
what about a documentation of Automagic intents?
Thinking that Liama manages cell based locations better than Automagic I would like to combine these apps and trigger Automagic from Liama calling Automagic to start a specific Flow/Shortcut.
Cheers
Stefan
Re: DIY-Actions/Triggers: Start Activity, General Broadcast
Hi Stefan,
You can execute a flow in Automagic by adding a trigger Shortcut to a flow in Automagic and launch/execute the shortcut using Llama (Run App Shortcut).
You could also define a trigger General Broadcast using your own action name and send this broadcast intent using Llama (Android intent, Intent send mode=Broadcast). The broadcast method is more flexible and also allows to pass additional data to Automagic by using the extras fields.
Regards,
Martin
You can execute a flow in Automagic by adding a trigger Shortcut to a flow in Automagic and launch/execute the shortcut using Llama (Run App Shortcut).
You could also define a trigger General Broadcast using your own action name and send this broadcast intent using Llama (Android intent, Intent send mode=Broadcast). The broadcast method is more flexible and also allows to pass additional data to Automagic by using the extras fields.
Regards,
Martin
Re: DIY-Actions/Triggers: Start Activity, General Broadcast,
Hi
I have exactly the same issue. I need to start some flows automagic from llama as I have found the two apps have different strengths for me. For me too llama does a good job with locations using cell towers while automagic is excellent in everything else. I have done stuff with automagic that was almost impossible to do with other apps. What I need to do is start a flow triggered by llama when I enter or leave a certain area. I am not very good with intents but I am willing to use them if someone can give specific instructions. I do not know how I can create a flow-shortcut which I understand I can run from llama. Alternatively sending a "text key word" directly to automagic to be evaluated in a flow would be magic for me. I have seen some general comments on intents, general broadcast etc but its not specific enough for me and what I need to do. Any help will be appreciated.
Thanks
Mbuso
I have exactly the same issue. I need to start some flows automagic from llama as I have found the two apps have different strengths for me. For me too llama does a good job with locations using cell towers while automagic is excellent in everything else. I have done stuff with automagic that was almost impossible to do with other apps. What I need to do is start a flow triggered by llama when I enter or leave a certain area. I am not very good with intents but I am willing to use them if someone can give specific instructions. I do not know how I can create a flow-shortcut which I understand I can run from llama. Alternatively sending a "text key word" directly to automagic to be evaluated in a flow would be magic for me. I have seen some general comments on intents, general broadcast etc but its not specific enough for me and what I need to do. Any help will be appreciated.
Thanks
Mbuso
Re: DIY-Actions/Triggers: Start Activity, General Broadcast,
Sorry got it by creating a widget and starting the flow from Llama. Still new to automagic. The two of them put together are amazing.
Re: DIY-Actions/Triggers: Start Activity, General Broadcast,
Is it possible to receive applications action "Share" by broadcast trigger?
Re: DIY-Actions/Triggers: Start Activity, General Broadcast,
Unfortunately that's currently not possible. Apps don't send this intent as a broadcast.
The plugin AutoShare might be capable to intercept such intents (untested by me).
Regards,
Martin
The plugin AutoShare might be capable to intercept such intents (untested by me).
Regards,
Martin