add notes exporting

This commit is contained in:
tibbi 2018-02-22 16:14:14 +01:00
parent 926ba81bcd
commit 2fa449d60e
2 changed files with 4 additions and 1 deletions

View File

@ -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<Contact>) -> Unit) {
val contacts = SparseArray<Contact>()

View File

@ -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)