DIY-Actions/Triggers: Start Activity, General Broadcast, ...

Post your questions and help other users.

Moderator: Martin

Mar
Posts: 49
Joined: 20 May 2015 23:24
Location: Germany

Re: DIY-Actions/Triggers: Start Activity, General Broadcast,

Post by Mar » 01 Jan 2016 17:05

Hi,
I would like to communicate between Tasker and Automagic. If it's possible, without any additional applications. Using the search function, I haven't found any topic that gives me a hint.
So, I would like to send a broadcast from Tasker to Automagic.
I found "Sende Intent" in Tasker. That sounds suitable. And in Automagic, the trigger "Genereller/General Broadcast" is the right one, isn't it?
But I can't figure out how to configure these things. I have already tested many ways, but it haven't worked.
Regards,
Mar

User avatar
Martin
Posts: 4345
Joined: 09 Nov 2012 14:23

Re: DIY-Actions/Triggers: Start Activity, General Broadcast,

Post by Martin » 04 Jan 2016 20:58

Hi,

General Broadcast is the correct trigger. Set the action to a value like my.trigger, save the trigger and enable the flow and then use action/task Send Intent, set action also to my.trigger and select Broadcast receiver as the target.

Regards,
Martin

Mar
Posts: 49
Joined: 20 May 2015 23:24
Location: Germany

Re: DIY-Actions/Triggers: Start Activity, General Broadcast,

Post by Mar » 05 Jan 2016 06:14

Oh yes indeed. That works. Thank you very much. :D

6234234234
Posts: 6
Joined: 24 Dec 2015 15:33

Re: DIY-Actions/Triggers: Start Activity, General Broadcast,

Post by 6234234234 » 13 Jan 2016 18:31

The example for yatse is not working.

It's missing the explicit Component flag and the package name "org.leetzone.android.yatsewidgetsfree"

Maybe you can correct that :)

EDIT: Strangely enough, I can't get the select mediacenter host to work.

ACTION: org.leetzone.android.yatsewidget.ACTION_APP_SELECT_MEDIACENTER
EXTRAS: putString("org.leetzone.android.yatsewidget.EXTRA_INT_PARAMS", "6");

This works in tasker and changes the mediacenter host, but doesn't seem to do much here in automagic?!

User avatar
Martin
Posts: 4345
Joined: 09 Nov 2012 14:23

Re: DIY-Actions/Triggers: Start Activity, General Broadcast,

Post by Martin » 13 Jan 2016 20:39

Thanks for reporting, I'll update the example.
You have to use putInt for integer extras:
putInt("org.leetzone.android.yatsewidget.EXTRA_INT_PARAMS", 6);

Regards,
Martin

6234234234
Posts: 6
Joined: 24 Dec 2015 15:33

Re: DIY-Actions/Triggers: Start Activity, General Broadcast,

Post by 6234234234 » 13 Jan 2016 22:40

D'OH

Of course, that was obviously too easy to figure it out by myself.

Thanks man, love the app btw!

User avatar
Martin
Posts: 4345
Joined: 09 Nov 2012 14:23

Re: DIY-Actions/Triggers: Start Activity, General Broadcast,

Post by Martin » 15 Jan 2016 19:32

No problem :-)

Thanks, glad you like Automagic!

thaliondrambor
Posts: 1
Joined: 12 Apr 2016 18:31

Re: DIY-Actions/Triggers: Start Activity, General Broadcast,

Post by thaliondrambor » 12 Apr 2016 19:12

Hello there,

I just want to add some Intents I use.

Starting Squeezeplayer in the background and/or keep it alive/connected:

Code: Select all

Action Typ:             Start Service
Action:                   androind.intent.action.MAIN
Explicit Component
Package Name:       de.bluegaspode.squeezeplayer
Class Name:           de.bluegaspode.squeezeplayer.playback.service.PlaybackService
Source: http://www.squeezeplayer.com/2013/05/st ... n-startup/

Connecting/Disconnecting VPN with VPNcilla:

Code: Select all

Action Typ:             Start Activity
Action:                   android.intent.action.MAIN
Explicit Component
Package Name:       com.gmail.mjm4456.vpncilla
Class Name:           com.gmail.mjm4456.vpncilla.VpncList
Extras:                   putString("android.intent.extra.shortcut.NAME","<name>"); // For <name> use the name of the connection in VPNcilla
                            {optional} putString("vpncilla.extra.FORCE","<connect/disconnect>"); // Without the VPN connection toggles, with it just connects or dissconnects
VPNcilla sends an broadcast intent, which you can use to check, wether it's connected or not.

Code: Select all

Intent: "com.gmail.mjm4456.vpncilla.VPNC_CONNECTIVITY_CHANGE"
Integer Extra: "reason" 
    which is set to:
    0 = VPNC_STOPPED
    1 = VPNC_CONNECTED
    2 = VPNC_ERROR
    3 = VPNC_CONNECTING
    4 = VPNC_WAIT_ON_RECONNECT
source https://sites.google.com/site/mjm4456/v ... automation

Other possibility to check for connection is with the notification bar:

Code: Select all

Condition Typ:         Notification on Statusbar Displayed
Package Name:       android
Text:                      Verbunden mit <name>

User avatar
Martin
Posts: 4345
Joined: 09 Nov 2012 14:23

Re: DIY-Actions/Triggers: Start Activity, General Broadcast,

Post by Martin » 13 Apr 2016 19:08

Thanks! I've incorporated it into the examples available in the app.

6234234234
Posts: 6
Joined: 24 Dec 2015 15:33

Re: DIY-Actions/Triggers: Start Activity, General Broadcast,

Post by 6234234234 » 31 Oct 2016 09:26

Hey guys,

I'm using Sleep as Android as my alarm clock and want to make use of the intents it sends out, specifically the "user pressed snooze button"

The documentation for the app states that the intent is "com.urbandroid.sleep.alarmclock.ALARM_SNOOZE_CLICKED_ACTION" which works fine if I use it in Tasker, but not so much in automagic.

If I understood it correctly, the general broadcast trigger is the equivalent feature of tasker's intent received. If I search the general broadcast action section for "urbandroid" I only get "com.urbandroid.sleep.alarmclock.ALARM_ALERT", which is not even listed on the API page of sleep as android.

Here is the link to the API page where the intents are listed.
http://sleep.urbandroid.org/documentati ... providers/

Could someone point me in the right direction of what I need to do in order to use this intent in automagic? Is it necessary to be included in automagic itself?

Thanks!

EDIT: Nevermind my stupidity, I was missing the first c in package name. Copy and paste error. Works as designed ;)

Post Reply