diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Activity.kt index d90281c4..9fcac817 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Activity.kt @@ -16,6 +16,7 @@ import com.simplemobiletools.contacts.pro.activities.SimpleActivity import com.simplemobiletools.contacts.pro.activities.ViewContactActivity import com.simplemobiletools.contacts.pro.helpers.DEFAULT_FILE_NAME import com.simplemobiletools.contacts.pro.helpers.VcfExporter +import ezvcard.VCardVersion fun SimpleActivity.startCallIntent(recipient: String) { handlePermission(PERMISSION_CALL_PHONE) { @@ -63,7 +64,7 @@ fun BaseSimpleActivity.shareContacts(contacts: ArrayList) { } getFileOutputStream(file.toFileDirItem(this), true) { - VcfExporter().exportContacts(this, it, contacts, false) { + VcfExporter().exportContacts(this, it, contacts, false, version = VCardVersion.V3_0) { if (it == VcfExporter.ExportResult.EXPORT_OK) { sharePathIntent(file.absolutePath, BuildConfig.APPLICATION_ID) } else { diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/VcfExporter.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/VcfExporter.kt index c71ff289..10bccdf6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/VcfExporter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/VcfExporter.kt @@ -36,6 +36,7 @@ class VcfExporter { outputStream: OutputStream?, contacts: ArrayList, showExportingToast: Boolean, + version: VCardVersion = VCardVersion.V4_0, callback: (result: ExportResult) -> Unit ) { try { @@ -165,7 +166,7 @@ class VcfExporter { } // whatsapp does not support version 4.0 yet - Ezvcard.write(cards).version(VCardVersion.V3_0).go(outputStream) + Ezvcard.write(cards).version(version).go(outputStream) } catch (e: Exception) { activity.showErrorToast(e) }