Zooper Widget bluetooth variable [req. tasker]

Posted: 2014/04/11 in Tasker, Zooper Tutes
Tags: ,

This is a guide [using Tasker] to create a Zooper variable that shows Bluetooth status. It’s quite similar to creating the headphone variable I covered earlier, but a little bit more involved as it has to check if Bluetooth is connected as well as just on or off.

Things you will need:

Setting up the tasks in Tasker:

  • Task1 (Name it BTON)
    1. Add an action
    2. Choose: Plugin -> Zooper Widget Pro
    3. Configuration: ZW Variable = BTSTAT | ZW Text = 1
    4. Task should look like this when done:

_20140411_151743

  • Task2 (Name it BTCON)
    1. Add an action
    2. Choose: Plugin -> Zooper Widget Pro
    3. Configuration: ZW Variable = BTSTAT| ZW Text = 2
    4. Task should look like this when done:

_20140411_151701

  • Task3 (Name it BTOFF)
  1. Add an action
  2. Choose: Plugin -> Zooper Widget Pro
  3. Configuration: ZW Variable = BTSTAT| ZW Text = 0
  4. We also need to add an If statement here of %PACTIVE !~(Doesn’t match) BTCON. This is saying only set it to 0 if the profile ‘BTCON’ is not active. This will make more sense once we’ve set up the profiles.
  5. This task should look like this when done:

_20140411_151725

Setting up the Profile in Tasker:

  • Profile 1
    1. Add profile – name it ‘BTCON’
    2. Choose: State ->Net-> BT Connected -> Any
    3. Pick the BTCON task
    4. The profile should look like this when done:

_20140411_151643

  • Profile 2 (Name it BTON)
    1. Add profile – name it ‘BTON’
    2. Choose: State ->Net-> BT Status -> On
    3. Pick the BTON task
    4. Long press BT Status On and choose Add
    5. Choose: State ->Tasker-> Profile Active -> Name = BTCON and select Invert.
    6. Long press BTON (Entry task) and press ‘Add Exit Task’
    7. Pick the BTOFF task
    8. The profile should look like this when done:

_20140411_151602

If everything’s set up alright, you should now have a variable #TBTSTAT# that is 0 when Bluetooth is off, 1 when Bluetooth is on but not connected and 2 when Bluetooth is connected.

You can download the already made profiles and tasks from here to import to tasker.

Below is a description of how to incorporate this into a widget.

Setting up the widget:

  1. Download a font that includes Bluetooth symbols and add it to your fonts directory. You can use my jsmaster font here. The letter v = Bluetooth on and w = Bluetooth connected.
  2. Insert a text or Rich text module to the widget you want.
  3. Choose the correct Font Family e.g. jsmaster if you used the above font.
  4. Select ‘Edit text manually’
  5. Add this conditional: $#BTSTAT#=1?v$$#BTSTAT#=2?w$ – Basically that says If BTSTAT=1 then show the on icon, if BTSTAT=2 then show the connected icon. If BTSTAT doesn’t equal either of those, nothing will appear.

Once you’ve done this you should get a nice dynamic widget as seen below. Yes that’s a widget, not a statusbar.output_f5polA

 

You can see this variable in action in my Carded (HiddenMedia & Media/Event), HexyBeast (hexMediaHP), and xdaZooper Pro (xdaMediaEvent) Skins on the Play Store.

Advertisements

Comments are closed.