Variable replacement help

40 views
Skip to first unread message

Abhishek Kapoor

unread,
Jun 11, 2016, 5:14:54 PM6/11/16
to Tasker - Developers
Hi,

I am new to andriod programming and infact pretty new to Tasker.
Tasker is the only reason I moved to Andriod from IOS.

I am playing around toast example of Tasker plugin.
How can I achieve variable replacement in toast configuration.
That is, if I insert %DAYW in configuration and then run the action, it should replace it to current day.
Flash action is able to replace global variable to its respective value. I wanted to achieve the same .

Below code snippet doesn't work for me 

final Bundle resultBundle = PluginBundleManager.generateBundle(getApplicationContext(), message);



resultIntent.putExtra(com.twofortyfouram.locale.Intent.EXTRA_BUNDLE, resultBundle);

/*
 * The blurb is concise status text to be displayed in the host's UI.
 */
final String blurb = generateBlurb(getApplicationContext(), message);
if ( TaskerPlugin.Setting.hostSupportsOnFireVariableReplacement( this ) )
    TaskerPlugin.Setting.setVariableReplaceKeys( resultBundle,
            new String [] { message } );


resultIntent.putExtra(com.twofortyfouram.locale.Intent.EXTRA_STRING_BLURB, blurb);

setResult(RESULT_OK, resultIntent);


Pardon my ignorance, I am pretty mush new to andriod programming and Tasker.

Any help would be really appreciated .

Thanks
Abhi

Abhishek Kapoor

unread,
Jun 11, 2016, 7:28:32 PM6/11/16
to Tasker - Developers
Basically in short, I wish to create my own flash action plugin.....@pent , would you be kind enough to share the code snippet for the same.

Abhishek Kapoor

unread,
Jun 11, 2016, 9:00:39 PM6/11/16
to Tasker - Developers
Nevermind fixed...My bad I was blindly following the code, need to tweak
PluginBundleManager to accept more than two arguments
Reply all
Reply to author
Forward
0 new messages