Event plugin - "no plugin configuration data"

310 views
Skip to first unread message

m

unread,
Jul 29, 2016, 4:11:17 PM7/29/16
to Tasker - Developers
Hello,

I'm implementing tasker plugin which will trigger events. I can choose that event in when creating new profile, but getting "Error: no plugin configuration data" when would like to leave plugin configuration page.

What I need to save an event in tasker? Is there something that must be returned in result from EditActivity?

Regards,
Marek

Pent

unread,
Jul 30, 2016, 2:59:33 AM7/30/16
to Tasker - Developers


What I need to save an event in tasker? Is there something that must be returned in result from EditActivity?

Of course, you need to return the configuration Bundle with the values that the user has
selected in the activity. Have a look at the code in the example condition plugin.

Pent

m

unread,
Jul 30, 2016, 4:26:07 AM7/30/16
to Tasker - Developers
You mean the bundle like returned by this code: https://github.com/twofortyfouram/android-display-condition-plugin-for-locale/blob/master/displayPluginConditionApp/src/main/java/com/twofortyfouram/locale/example/condition/display/ui/activity/EditActivity.java#L114 ?

I'm returning bundle like this:

Bundle ret = new Bundle();

ret.putBoolean("com.twofortyfouram.locale.example.condition.display.extra.BOOLEAN_STATE", true);

return ret;

Is that ok?

m

unread,
Jul 30, 2016, 4:50:52 AM7/30/16
to Tasker - Developers
Here's my code: https://github.com/marekw2143/testTasker/blob/master/plugin1/app/src/main/java/com/testTasker/plugin1/EditActivity.java

I don't know why getResultBundle() is not called (I call finish in onResume so I thought that will be enoguth).

Can anyone tell my why getResultBundle() is not called ?

m

unread,
Jul 30, 2016, 6:31:15 AM7/30/16
to Tasker - Developers

Generally it occurred that I've used AbstractAppCompatPluginActivity implementation which finish() didn't use getResultBundle into account. After calling setResult explicity, then I can set needed config data like this:

        final Bundle resultBundle = getResultBundle();

        if(resultBundle != null) {
            String blurb = getResultBlurb(resultBundle);
            Intent resultIntent = new Intent();
            resultIntent.putExtra(com.twofortyfouram.locale.api.Intent.EXTRA_BUNDLE, resultBundle);
            resultIntent.putExtra(com.twofortyfouram.locale.api.Intent.EXTRA_STRING_BLURB, blurb);

            setResult(RESULT_OK, resultIntent);


Thanks for help.

            finish();



W dniu sobota, 30 lipca 2016 10:26:07 UTC+2 użytkownik m napisał:

Pent

unread,
Jul 30, 2016, 6:34:01 AM7/30/16
to Tasker - Developers

Generally it occurred that I've used AbstractAppCompatPluginActivity implementation

That's what I was in the middle of responding. Apparently the Locale dev has changed
the layout of the examples and I hadn't noticed till now.

Pent

tym...@gmail.com

unread,
Mar 15, 2017, 9:16:36 AM3/15/17
to Tasker - Developers
Would be nice if this could be added to the documentation.

Matt

unread,
Jun 23, 2018, 2:23:18 AM6/23/18
to Tasker - Developers
Could someone please create a working sample event plugin on GitHub?

There are a a few compile errors when following the instructions at https://tasker.joaoapps.com/plugins-intro.html to create an Event plugin.

I have fixed these so that the application compiles, but it does not work correctly. For instance, editing the plugin condition does not populate the old value and the event for display on/off does not trigger either.

Thanks.

ryan.mo...@gmail.com

unread,
Jul 2, 2019, 3:20:14 AM7/2/19
to Tasker - Developers
An updated example would be greatly appreciated. I cannot seem to get my edited display project to build.

João Dias

unread,
Jul 2, 2019, 6:12:52 AM7/2/19
to task...@googlegroups.com
Hi there! 
Does this help?

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


--
You received this message because you are subscribed to the Google Groups "Tasker - Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taskerdev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/taskerdev/efc0dd76-ef5c-456a-8d90-308c40f0584a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages