HomeTaskerOne thing that Join app can't do and how to fix it...

One thing that Join app can’t do and how to fix it with Tasker

How to sync clipboard between different Join accounts

Join app is pretty much the first app that I load on any phone. I’m used to a single feature, that I no longer can live without. Seamless clipboard sharing between devices is simply magnificent. It saves times, makes things super simple, and the best thing is: once set, you can forget about it. That was until I discovered, that automatic clipboard share isn’t available for “shared devices”. I guess it’s time for Tasker to step in.

Join & clipboard share

I switched to Android 10 recently, and as part of the move, I got myself a 2nd Join licence to run on my notenoughtech account. I didn’t have a particular reason for it since I can do “family share”, but I wanted to do this and see how shared devices would work.

Android 10 and clipboard

Right off the start, I had to go through the new permission procedure to enable clipboard harvesting on Android 10. This is a one time process, as long as you exclude Android 10 from killing Join app (check the battery optimization settings, reboot your phone to remove the annoying reminder). You can use this guide to setup ADB then run these four lines:

adb -d shell appops set com.joaomgcd.join SYSTEM_ALERT_WINDOW allow
adb shell pm grant com.joaomgcd.join android.permission.WRITE_SECURE_SETTINGS
adb shell pm grant com.joaomgcd.join android.permission.READ_LOGS
adb shell am force-stop com.joaomgcd.join 

Now that you are all set, you can share the clipboard between all devices that run a version of Join (Android, Chrome Browser, Windows 10 and even NodeRED) signed in to the same account.

If you have 2 licences for Join app, this option isn’t possible. What’s possible is to use Tasker to fix this. It’s not as simple as you may think.

Loop me NOT!

My initial approach was to use %CLIP variable as a trigger on both devices and share the clipboard each time a new one is assigned. There is a catch. If you do that on both phones, there is a chance you will create a feedback loop if the Join push is delayed a bit. Setting a clipboard on one phone will share the clipboard with another phone, setting the clipboard there… which… you guessed it… will detect clipboard change and repeat the task the other way around.

That’s the easiest way to get in trouble, so let’s fix this. To solve the puzzle, we need Tasker to know when the clipboard is set by Join, and when it’s set by Android. Thankfully, we can sort out with Join and AutoApps commands.

Tasker Project

To make this work, you have to create this Tasker profile on each android device with a different email licence. This profile will be responsible for sharing the clipboard set by Android system and preventing loops.

(ClipShare) CS share clip

TASKER PROFILE: JOIN Command
Profile: CS Share Clip 
    Restore: no
    Event: Variable Set [ Variable:%CLIP Value:* User Variables Only:Off ]
Enter: CS Share Clip 
    A1: Join Send Push [ Configuration:Device: Mat's Pixel 3
Text: clip=:=%CLIP
Join Command: true Timeout (Seconds):60 ] 

To monitor changes made by Android to the clipboard content, use Event – Variable Set – and %CLIP variable. When a new clipboard is set, simply send a Join push message.

The push message can’t set the clipboard directly, otherwise, you will trigger the loop so I’m sending a text: jointextpush=:=clip=:=%CLIP to another Join device licensed to a different email. (to automatically set jointextpush=:= prefix, go to advanced options of Join Push action).

JOIN Command

TASKER PROFILE: JOIN Command
Profile: JOIN Command 
    Restore: no
    Event: AutoApps Command [ Configuration:Command Filter: jointextpush ]
Enter: CS Set Clip 
    A1: If [ %aacomm1 ~ clip ]
    A2: Profile Status [ Name:CS Share Clip Set:Off ] 
    A3: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ] 
    A4: Set Clipboard [ Text:%aacomm2 Add:Off ] 
    A5: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ] 
    A6: Profile Status [ Name:CS Share Clip Set:On ] 
    A7: End If 

Before I can apply the new clipboard, I have to use Profile Status action to disable my CS Share Clip profile. I used AutoApps command system to create a universal Join Command profile which uses the following structure:

jointextpush=:=clip=:=%CLIP 
%aacomm1 = clip
%aacomm2 = %CLIP

This way, I can simply add more commands to my profile later using %aacomm1 in my IF conditions. When the AutoApp command is received, Tasker disables the CS Share Clip, sets a new clipboard according to %aacomm2 and enables the SC Share Clip again for further monitoring. I have added 2 wait actions that you can modify accordingly.

Conclusion

I’m pleased with the final effect. I could go back to Join and family library if I wanted to, but this small Tasker project was worth my time, as I like solving small problems. If you use Join on more than one account – perhaps this could be a useful hack to you too! Let me know what other fun things you do with Join app in this Reddit thread.

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

New to Tasker?

Tasker Quick Start – Getting started with Tasker

0
From newb to not so newbie in 10 min

Best Tasker Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

How to wake on LAN computers and put it to sleep with Power Menu,...

0
How to Wake on LAN properly via Android, Alexa, Google Assistant and Web

7 awesome Bluetooth keyboard shortcuts for Android

0
7 unique Android shortcuts that you can add to any Bluetooth keyboard.

Smart overnight charging with Tasker

0
Still keeping your phone plugged in overnight? Try smarter overnight charging with this profile

Tasker: Set USB for file transfer automatically

0
One of the most annoying things in new Android is the inability to trust USB devices permamently

Essential Guides

Tasker: Seconds into DD:HH:MM:SS (dynamic)

0
It's time to.... ok it's a pun, but I will show you how to master time and convert seconds to DD:HH:MM:SS dynamically

4 ways to organise Tasker projects

0
Keep your Tasker tidy!

A better way to store Tasker credentials

0
The more clever way of managing credentials

Annoyed with dozens of AutoApps populating your app drawer? Here is a fix!

0
Clear your app drawer from the clutter in seconds

Putting AutoTools pie chart to a good use – SSID logger

0
Who wants a piece of the pie (chart)?