Understanding the InfoActivity plugin example

34 views
Skip to first unread message

nichol...@gmail.com

unread,
Sep 12, 2016, 1:58:14 AM9/12/16
to Tasker - Developers
I'm not terribly experienced with android programming specifically. I have the InfoActivity example working on my phone and I am trying to figure out how to add a few more parameters and how to use Tasker variables.

The example uses something called PluginBundleManager which seems to only be set up for a single string parameter as far as I can tell. None of the information I can find about using Bundles seems to match up with what's going on in the example.

How might I add more parameters to my plugin?

Pent

unread,
Sep 12, 2016, 2:25:04 AM9/12/16
to Tasker - Developers, nichol...@gmail.com
Havn't used this code before (it's relatively new), but looks like
you just need to change PluginBundleValues.java. First,
add your parameter to the generateBundle and isBundleValid
functions, then add a new function to retrieve it from other
places in your code (analogous to the getMessage function
already there for the message parameter)

Pent

nichol...@gmail.com

unread,
Sep 12, 2016, 11:05:03 PM9/12/16
to Tasker - Developers, nichol...@gmail.com
Can you recommend an example or tutorial that is a little more bare bones or straight forward? I also can't find any information about the license agreement for the TwoFortyFourAM example and I might like to put my plug in the Play store.

Pent

unread,
Sep 13, 2016, 4:58:32 AM9/13/16
to Tasker - Developers, nichol...@gmail.com

Can you recommend an example or tutorial that is a little more bare bones or straight forward?

I don't know of any others.

But you should only really need to look at activity/EditActivity.java and receiver/FireReceiver.java (function onReceive).
 
I also can't find any information about the license agreement for the TwoFortyFourAM example and I might like to put my plug in the Play store.

I don't know anything about licensing for the sample code, I doubt they have anything against using it
as a base, since that's what it's for.

Pent
Reply all
Reply to author
Forward
0 new messages