, 2 min read

J-Pilot Data on Android Phone: Contacts

Original post is here eklausmeier.goip.de/blog/2020/03-19-j-pilot-data-on-android-phone-contacts.


Keeping J-Pilot data in sync with Android smartphone is quite a challenge. See my post about Google calendar. Copying contact data from J-Pilot to Android in the past went like this:

  1. Export data from J-Pilot in vCard (vcf) format
  2. If required, fiddle with this vcf file with some Perl script
  3. Stopping contact app in Android and stopping WiFi. Deleting all data in Android app.
  4. Manually delete contacts in Google Contacts in batches of ca. 500 records (Added 10-May-2020: Meanwhile there is no longer a limit here, so you can delete all your contacts in one go.)
  5. Import vCard data in Google Contacts
  6. Turn on WiFi on Android, starting contact-app

As one can easily see, this was very cumbersome. To make this even more difficult, now Google has limited the number of imported records in vCard file to 1,000 records per day. If you have more than that, then you are stuck. The limits are documented in quotas. [Added 08-Feb-2021: It seems Google has acknowledged their silliness here, so you can upload at least 5,500 records, as found by experiment.] The limits are (were)

  1. Calendar events created: 5,000 / day
  2. Contacts created: 1,000 / day
  3. Email recipients per day: 100 / day
  4. Email read/write (excluding send): 20,000 / day

For contacts there is an alternative in the suite of "Simple Mobile Tools". On Android there is an app called Simple Contacts.

Its Kotlin source code can be inspected in GitHub. All these "Simple Mobile Tools" were written by Tibor Kaputa. He has given some reasons why and how he wrote them here.

"Simple Contacts" can import vCard files. I have not experienced any limits on the size of the vCard file. Though, I did encounter a limit on the number of contacts you can delete.

The first step is to disallow "Simple Contacts" any access to the Google contacts. That way any updates to contacts in "Simple Contacts" do not disturb your Google contacts.

The steps to refresh your contacts on Android are therefore:

  1. Export data from J-Pilot in vCard format
  2. Fiddle with that data, if required
  3. Stop "Simple Contacts" and delete data (see screenshot below)
  4. Add one dummy record manually in "Simple Contacts", e.g., just one name
  5. Dummy record can be deleted, if required
  6. Import vCard file
  7. Set your preferences again in "Simple Contacts" as they have been dropped with all your data

This kind of deletion shown below, is only required if you hit the delete-limit.