Using variables in Tasker
Posted
by
Waza_Be
on Stack Overflow
See other posts from Stack Overflow
or by Waza_Be
Published on 2012-12-15T17:00:53Z
Indexed on
2012/12/15
17:03 UTC
Read the original article
Hit count: 186
I am trying to create a Tasker plugin.
Everything is fine, and works pretty well.
I can configure a String to be sent in my app by using EditActivity and this code, following the examples:
resultIntent.putExtra(com.twofortyfouram.locale.Intent.EXTRA_BUNDLE,PluginBundleManager.generateBundle(getApplicationContext(),message));
resultIntent.putExtra(com.twofortyfouram.locale.Intent.EXTRA_STRING_BLURB,generateBlurb(getApplicationContext(), message));
setResult(RESULT_OK, resultIntent);
The problem comes when I want to use this code to get the battery level for instance, so I added:
resultIntent.putExtra("net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS",com.twofortyfouram.locale.Intent.EXTRA_STRING_BLURB);
but the app is not working and I get a string %BATT as the result, the variable is not replaced...
As I haven't found any example, I would be pleased to get some help to make it work.
© Stack Overflow or respective owner