ez-vcard
ez-vcard copied to clipboard
Migration to 0.12.0 while still supporting Android API 21..25
After updating to 0.12.0 , I've noticed that it has some changes that I hope I've found proper alternatives to them:
- Doesn't support File class as parameter for
VCardWriter
and maybe also others. There is Path instead, but it requires API 26 while the app I work on is for Android API 21 and above. Is it ok to use this instead:
vCardWriter = VCardWriter(BufferedOutputStream(FileOutputStream(vcfFile)), VCardVersion.V4_0)
?
Does it auto-close the stream?
- The class
Birthday
doesn't support providingDate
class to it. I can't use Temporal as it requires API 26 . Is it ok to convert toPartialDate
? Would work the same? Meaning like this:
val vCard = VCard()
//birthdate is of type Date
val date =
PartialDate.builder().year(birthdate.year).month(birthdate.month).date(birthdate.date).build()
vCard.birthday = Birthday(date)
I tried to find information on the repository, but found only what has changed, and not how to migrate: https://github.com/mangstadt/ez-vcard/wiki/Changelog
Please help.