Tasker Setup

Example Selfie remote.

This in-depth guide will show you how to setup your Android phone to be able to react to the Volume Up key used by many cheap bluetooth selfie-clickers. The Android operative system will not allow web apps to listen to the Volume Up keys. The way around this restriction is to use an app called Tasker to listen for the Volume Up key presses and then send keyboard shortcuts to the Shared Game Timer which it can listen and react to.

    Some notes:
  1. Don't be afraid of the length of this guide. I am really hand-holding you here, and each step is easy.
  2. This setup requires you to give permissions to tasker to intercept key presses. This is not something you should do normally. A hacker could use such powers to e.g. steal passwords that you type. Tasker itself is such a major app that I don't worry about them. But don't get into the habit of installing stuff that require these kind of permissions. You can and should inspect the Tasker scripts that this guide asks you to install to make sure that they do what they say. But yeah... Don't do this kind of stuff if a random stranger asks you to!
  3. If you struggle, please feel free to and I will try to help.
  4. I am going to write 'SGT' instead of 'Shared Game Timer' to keep my sanity intact.

Test the clicker

We first make sure that the selfie-clicker really sends the Volume Up button. No point doing all of the below if it won't work in the end. So, connect your selfie clicker to you Android over bluetooth and click the button. Did it raise the volume? If so, great! Go to the next section.

If not, open a an email or other text input and put the cursor to input text. Click again. Did it do something now? If it made a new line, then it sends the 'Enter' key, which is even greater! No need to do the below. SGT can already handle your clicker. Inside an SGT game, open the game menu, pick 'Remote Control' and check the 'Remote Button'. Go back to the game and it should now work! Refer to the selfie clicker page for information about which button presses does what.

If you clicker didn't do either Volume Up or Enter, then I'm stumped. It might simply not work. If it sends something other than 'Volume Up' or 'Enter', then contact me and let me know. I'll make it work for you.

Install Tasker

  1. Install Tasker from the Android Play Store.
  2. Open Tasker and click away the welcome notification and pick 'The Full Experience'
  3. Tasker requires a whole bunch of permissions. The first batch show up as a bunch of orange checkboxes you must check. Read them first! They will tell you what to do on the popup screens that pop up when you check the boxes.
  4. One permission I had to do on my Samsung tablet was to go to 'Android Settings > Apps > Tasker > Battery Optimization', find the Tasker app and turn off battery optimization.

Install AutoInput

AutoInput is an addon to Tasker that allows it to intercept key presses. It is a paid-for thing, but apparently you can use it for free if you watch an add. (Never tried that though; I bought it.)

  1. Install AutoInput from the Android play store.
  2. Open it and accept the permissions.
  3. To buy the license, click the 'Get Full Version' and follow the prompts. Or, press the 'Use it for Free' option and follow those prompts. (You only need to buy it once, no matter how many devices you install it on.)
  4. In AutoApps, click the 'NOT ENABLED' option to enable it. Click OK in the popup and in the following popup, go to 'Installed Services' and enable AutoInput.
  5. Go back to AutoInput and you should see green text saying it is enabled. Also ensure the 'Intercept Keys' option is ON.

Setup Additional Permissions

This setup will require extra access to the device to handle input from the user. Normally, Android protects you from apps capturing key input to protect against malicious apps e.g. stealing passwords. But we need to intercept the Volume Up button.

To set these extra permissions, you need to connect your phone to a laptop, install an app on the laptop and then set the permissions on your Android device from this app. The instructions for how to do all of this is at this page, but I will cover what I did below as well.

  1. Download the app to my laptop
  2. Watched the video they had on that page while downloading.
  3. Run the downloaded program.
  4. There are instructions now how to connect your phone to the laptop using Developer and Debugging mode. The instructions were almost right for me. But, the 'Build Number' to press was located under 'Android Settings > Software Information > Build Number'. If you don't find it, google 'Enable Developer Mode' for your android device model. After that, I enabled USB Debugging under 'Android Settings > Developer Options'.
  5. Connect phone and laptop using a cable. Say yes to allow debugging. If it doesn't work, use a different cable. (some USB cables are only for charging)
  6. Click reload in the app and you should see your phone show up and a number of permissions. The ones you need to enable are:
    • Draw over other apps (should be on already)
    • Write Secure Settings

Install SGT Tasker Scripts

Go to the SGT page on TaskerNet on your Android device. This is where I keep all of my SGT Tasker scripts.

Import all that is there that starts with 'SGT'. You will be asked which project to import it to. Feel free to create a project called 'SGT' and put it all there to keep things organized. Don't think it matters. If you do, however, then you need to change the project view in tasker (at the bottom) to SGT or you won't see any of the tasks.

While importing, you might be asked to grant additional permissions. These will be granted in a popup. For me, I needed to give the 'Change System Settings' permission.

After each import, Tasker will ask if you want to run it. Say no. Each import opens up a new tab in your browser, so just close it to go back to the list of imports.

Turning the scripts on/off

Open Tasker and you should now see two SGT entries under the 'Profiles' tab and seven SGT entries under 'Tasks'. If you don't, then it might be because you imported them to a specific project. Switch to the correct project using the bottom navigation tabs.

To activate the scripts, activate the 'SGT Activator' and 'SGT Multi-Press' profiles using the switches next to their names. Also, make sure Tasker is enabled under the top-right menu.

The scripts will only work while viewing a SGT game. But, if you want to turn them off completely, either turn off the two profiles or turn off tasker all together, again, using the top-right menu.

Turn on the scripts and then open the Shared Game Timer. Pay attention to the bottom of the screen. If you see a small notification saying 'SGT Active', then it has worked! Try pressing the Volume Up key. It should not have raised the volume. Now leave the SGT by e.g. going to the home screen. You should see a notification saying 'SGT Deactivate', and your Volume Up key should once again control the volume.

Turning on the SGT keyboard shortcuts

With all of the above done, Tasker should be sending keyboard shortcuts when you do different combinations of key presses on the clicker (or Volume Up). But, you need to tell SGT to listen for those keyboard shortcuts or they will be ignored.

Open a SGT game and go to the 'Game Menu > Gesture Setup' and check the 'Keyboard Shortcuts' checkbox.

Go back to the game and try it out by pressing the clicker once. You should hear a beep, and then the primary action (usually End Turn) should be performed! Hurrah! 🥳

The different key press combinations should be the same as for the normal selfie-clicker option documented here. All presses must be done within 400ms.