Background
I hesitated to post this as it's probably only useful for a small audience (if any), but as I didn't find another solution, perhaps it can benefit others who are looking for this or for something similar.
I've been using the excellent MyPhoneExplorer (https://www.fjsoft.at/en/) for years to sync my contacts, calendar, and tasks from a Windows PC (first MS Outlook, then Mozilla Thunderbird) to my Android devices. In the future (possibly distant - or even never) I may switch completely from Windows to Linux. Unfortunately I (and apparently anybody else) was unable to get MyPhoneExplorer running on Linux - e.g. with WINE - and I don't want the overhead of a VM.
So I decided to create something myself: TBirdSync.I haven't tested it on Linux yet - that's for later (or never). Tested on Windows 10 and Linux Mint 20.02 Cinnamon.
The big picture - my setup
What does/doesn't it do?
It DOES:
- Synchronise Thunderbird contacts with one or more Android devices; contact matching is based on the combination of first and last name (which means that these combinations must be unique)
- Prepare calendar and tasks data and send them to the Android device(s) where they can be processed with the ICSx5 app (see below)
- Convert tasks data to calendar data, which means no separate tasks app is needed on the Android device: everything winds up in the calendar app, where tasks' titles are prefixed with '(T)' so that it's easy to distinguish them from appointments
It DOES NOT:
Perform a 2-way sync (so it's actually more mirroring than syncing): the synchronisation source is Thunderbird, and all changes to the data are expected to be applied there. Changes made on the Android device are not detected.
If you can live with these limitations, read on.
Why ICSx5?
I didn't want to write the calendar/tasks sync code as TBirdSync is a means to an end (i.e. moving to Linux) and not a goal by itself. Calendars are complex beasts and ICSx5 (https://play.google.com/store/apps/details?id=at.bitfire.icsdroid) is a low-cost app (1.99 EUR) that works perfectly; it's even open source and can be found on GitLab (https://gitlab.com/bitfireAT/icsx5). Among other, it syncs an iCalendar (.ics) file with a read-only calendar that it creates itself.
At the moment, ICSx5's sync can't be started via an Intent: on the Android device, TBirdSync starts the app and then a 'pull to refresh' is needed to sync the calendar and tasks data (unless a scheduled sync is setup; sync intervals as of 5 minutes can be selected). I've asked the developers if they would be willing to provide an Intent, and it's on their todo list. Once it's there, I'll update the app to start the sync without user interaction.
If you only want to sync contacts, ICSx5 is not needed.
Getting started
- Get ICSx5 (see above) and install it on the Android device(s)
- Install the TBirdSync app on the Android device(s), enter the settings, and save them
- Install the B4J program on the PC(s), enter the settings, and save them
- In the Android device(s) Settings / Battery / Battery optimization you may want to set TBirdSync and ICSx5 as 'Not optimised' so that they'll also keep going when the device is locked
- TBirdSync uses an iCalendar (.ics) file to process calendar and tasks data. In Thunderbird, you'll either have to manually use 'Export' from the 'Events and Tasks' menu each time you want to sync the data, or do this:
1. Export Events and Tasks to an .ics file
2. File / Open / Calendar file, and then select that exported file, and work with that calendar (and perhaps also delete the original one to avoid confusion/mistakes)
This way, the data are always available in .ics format. It does however slow editing calendar and tasks down a little, but in my opinion the performance hit is reasonable.
Other
- Deleting contacts (which is also used to update them as this simplified the code and speeds things up on the Android side because the PC side does the heavy lifting) didn't work on my Fire tablet with Android 5.1.1 but did on a Moto X Style phone with Android 7, which is why the minSdkVersion in the Manifest was set to 24 to correspond with Android 7. It is however possible that this was caused by the custom ROM I had installed on the Fire tablet and that it does work on older Android versions.
- The icon comes from https://www.pngrepo.com/svg/156939/update-business-user
- My environment: Windows 10, Thunderbird 78.10.1 (32-bit), Android 7, ICSx5 1.9.1-gplay, B4A 10.70, B4J 8.90
Non-core library dependencies
B4A:
- AndroidResources: https://www.b4x.com/android/forum/threads/16847
- Archiver: https://www.b4x.com/android/forum/threads/21688
- Clipboard: https://www.b4x.com/android/forum/threads/clipboard-library.7382
- zt-zip (see https://www.b4x.com/android/forum/threads/b4j-b4a-zt-zip.99595): add the 3 jars from the attached 'zt-zip jars.zip' to your B4A additional libraries folder
B4J:
- jReflection: https://www.b4x.com/android/forum/threads/jreflection-library.35448/
- zt-zip (see https://www.b4x.com/android/forum/threads/b4j-b4a-zt-zip.99595): add the 3 jars from the attached 'zt-zip jars.zip' to your B4J additional libraries folder
Screenshots
Enjoy!
I hesitated to post this as it's probably only useful for a small audience (if any), but as I didn't find another solution, perhaps it can benefit others who are looking for this or for something similar.
I've been using the excellent MyPhoneExplorer (https://www.fjsoft.at/en/) for years to sync my contacts, calendar, and tasks from a Windows PC (first MS Outlook, then Mozilla Thunderbird) to my Android devices. In the future (possibly distant - or even never) I may switch completely from Windows to Linux. Unfortunately I (and apparently anybody else) was unable to get MyPhoneExplorer running on Linux - e.g. with WINE - and I don't want the overhead of a VM.
So I decided to create something myself: TBirdSync.
The big picture - my setup
What does/doesn't it do?
It DOES:
- Synchronise Thunderbird contacts with one or more Android devices; contact matching is based on the combination of first and last name (which means that these combinations must be unique)
- Prepare calendar and tasks data and send them to the Android device(s) where they can be processed with the ICSx5 app (see below)
- Convert tasks data to calendar data, which means no separate tasks app is needed on the Android device: everything winds up in the calendar app, where tasks' titles are prefixed with '(T)' so that it's easy to distinguish them from appointments
It DOES NOT:
Perform a 2-way sync (so it's actually more mirroring than syncing): the synchronisation source is Thunderbird, and all changes to the data are expected to be applied there. Changes made on the Android device are not detected.
If you can live with these limitations, read on.
Why ICSx5?
I didn't want to write the calendar/tasks sync code as TBirdSync is a means to an end (i.e. moving to Linux) and not a goal by itself. Calendars are complex beasts and ICSx5 (https://play.google.com/store/apps/details?id=at.bitfire.icsdroid) is a low-cost app (1.99 EUR) that works perfectly; it's even open source and can be found on GitLab (https://gitlab.com/bitfireAT/icsx5). Among other, it syncs an iCalendar (.ics) file with a read-only calendar that it creates itself.
At the moment, ICSx5's sync can't be started via an Intent: on the Android device, TBirdSync starts the app and then a 'pull to refresh' is needed to sync the calendar and tasks data (unless a scheduled sync is setup; sync intervals as of 5 minutes can be selected). I've asked the developers if they would be willing to provide an Intent, and it's on their todo list. Once it's there, I'll update the app to start the sync without user interaction.
If you only want to sync contacts, ICSx5 is not needed.
Getting started
- Get ICSx5 (see above) and install it on the Android device(s)
- Install the TBirdSync app on the Android device(s), enter the settings, and save them
- Install the B4J program on the PC(s), enter the settings, and save them
- In the Android device(s) Settings / Battery / Battery optimization you may want to set TBirdSync and ICSx5 as 'Not optimised' so that they'll also keep going when the device is locked
- TBirdSync uses an iCalendar (.ics) file to process calendar and tasks data. In Thunderbird, you'll either have to manually use 'Export' from the 'Events and Tasks' menu each time you want to sync the data, or do this:
1. Export Events and Tasks to an .ics file
2. File / Open / Calendar file, and then select that exported file, and work with that calendar (and perhaps also delete the original one to avoid confusion/mistakes)
This way, the data are always available in .ics format. It does however slow editing calendar and tasks down a little, but in my opinion the performance hit is reasonable.
Other
- Deleting contacts (which is also used to update them as this simplified the code and speeds things up on the Android side because the PC side does the heavy lifting) didn't work on my Fire tablet with Android 5.1.1 but did on a Moto X Style phone with Android 7, which is why the minSdkVersion in the Manifest was set to 24 to correspond with Android 7. It is however possible that this was caused by the custom ROM I had installed on the Fire tablet and that it does work on older Android versions.
- The icon comes from https://www.pngrepo.com/svg/156939/update-business-user
- My environment: Windows 10, Thunderbird 78.10.1 (32-bit), Android 7, ICSx5 1.9.1-gplay, B4A 10.70, B4J 8.90
Non-core library dependencies
B4A:
- AndroidResources: https://www.b4x.com/android/forum/threads/16847
- Archiver: https://www.b4x.com/android/forum/threads/21688
- Clipboard: https://www.b4x.com/android/forum/threads/clipboard-library.7382
- zt-zip (see https://www.b4x.com/android/forum/threads/b4j-b4a-zt-zip.99595): add the 3 jars from the attached 'zt-zip jars.zip' to your B4A additional libraries folder
B4J:
- jReflection: https://www.b4x.com/android/forum/threads/jreflection-library.35448/
- zt-zip (see https://www.b4x.com/android/forum/threads/b4j-b4a-zt-zip.99595): add the 3 jars from the attached 'zt-zip jars.zip' to your B4J additional libraries folder
Screenshots
Enjoy!
Attachments
-
TBirdSync_B4A.zip96.9 KB · Views: 392
-
TBirdSync_B4J.zip63.9 KB · Views: 383
-
TBirdSync B4J screenshot.PNG38.9 KB · Views: 489
-
TBirdSync B4A screenshot.jpg294.8 KB · Views: 492
-
TBirdSync_B4A v2.zip98.9 KB · Views: 372
-
TBirdSync_B4J v2.zip65.5 KB · Views: 372
-
zt-zip jars.zip140.3 KB · Views: 346
-
TBirdSync_B4J v5.zip72.9 KB · Views: 319
-
TBirdSync_B4A v5.zip127.4 KB · Views: 310
-
TBirdSync_B4A v6.zip129.2 KB · Views: 241
-
TBirdSync_B4J v6.zip94.7 KB · Views: 296
-
TBirdSync_B4A v8.zip134.3 KB · Views: 258
-
TBirdSync_B4J v8.zip102.8 KB · Views: 259
Last edited: