From 2fa449d60e48085020b60ee14c1dec47b150b6a0 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 22 Feb 2018 16:14:14 +0100 Subject: [PATCH] add notes exporting --- .../com/simplemobiletools/contacts/helpers/ContactsHelper.kt | 1 - .../com/simplemobiletools/contacts/helpers/VcfExporter.kt | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt index 4215fb71..d4ad4483 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt @@ -28,7 +28,6 @@ import com.simplemobiletools.contacts.extensions.getByteArray import com.simplemobiletools.contacts.extensions.getPhotoThumbnailSize import com.simplemobiletools.contacts.models.* - class ContactsHelper(val activity: BaseSimpleActivity) { fun getContacts(callback: (ArrayList) -> Unit) { val contacts = SparseArray() diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/VcfExporter.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/VcfExporter.kt index 21f784ad..ec7e443e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/VcfExporter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/VcfExporter.kt @@ -62,6 +62,10 @@ class VcfExporter { } } + if (contact.notes.isNotEmpty()) { + out.writeLn("$NOTE${contact.notes.replace("\n", "\\n")}") + } + if (contact.thumbnailUri.isNotEmpty()) { val bitmap = MediaStore.Images.Media.getBitmap(activity.contentResolver, Uri.parse(contact.thumbnailUri)) addBitmap(bitmap, out)