Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I use a Google Talk status plugin (written for Locale) with Tasker, and the one thing I miss from Locale is the priority order of situations. That is, if I'm driving, then set status "Driving", else if I'm at work, "At work", else if [...] else "Available". (Locale does allow multiple situations to be active, but each type of action (e.g. Google Talk) will only get run once.)

I'm struggling to replicate this in Tasker. The priority setting on a task seems only to affect the order in which multiple tasks are run, whereas I'd like this particular plugin to be run once per situation-change, with only one status (the one with highest priority) even if two situations are active. I also lack a place to put the default "Available" setting (exit tasks aren't really suitable).

Example: I start driving to work. Status "Driving". I get near the office. Status should still be "Driving" (highest priority). I arrive and disconnect from the car. Status should now be "At work".

...whereas if I naively put the plugin in each situation and set exit tasks of "Available", I will instead get "At work" when I get near the office, and "Available" when I get out of the car (from the exit task of the Driving situation).

I'm reluctant to go back to Locale because Tasker is more flexible for the other conditions and settings I'm using, and because it has more built-in conditions (e.g. power source mains/USB), meaning fewer Locale condition plugins need to be kept running in memory.

share|improve this question
    
Great question and exciting challenge. I'll have a ponder.. –  Dmitry Selitskiy Jul 12 '11 at 0:46
add comment

1 Answer

up vote 1 down vote accepted

That's something not easy to be simulated by Tasker, but should be possible. The most likely trick is working with variables -- an approach you find described at Google Groups: How To Default Profile? (check the post by Nikita Popov).

That example just defines a single default profile to fall back on if no other profile is active. A more complex example would properly make use of variables like %PACTIVE (currently active profile), in the way that a "lower-priority" profile would contain the condition that the higher is not contained in %PACTIVE (so it only becomes the active profile if no "higher-priority" profile is currently running).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.