mangstadt / ez-vcard

A vCard parser library for Java
Other
399 stars 92 forks source link

vCard.toList() (VCardProperty) list in return empty on release version #151

Open faiqfaheem opened 1 month ago

faiqfaheem commented 1 month ago

i didn`t want to get every property so i call vcard into list that return me the list of card properties but i working fine debug mode but on Release Version giving empty list :( mycode

val list: List = vCard.toList() Log.d("TAG", "onCreate42: "+list) for (i in list.indices) { val tagkey = list[i].toString().split("[")[0].replace("ezvcard.property.", "") if (!stringlist.contains(tagkey)) { stringlist.add(tagkey.trim()) val mvalue = getvalue(vCard, firstLetterSmall(tagkey)) // Log.d("TAG", "onCreate:$mvalue+") if (mvalue.trim() == "" || mvalue.trim() == "null") {

            } else {
                keylist.add(VCFContactModel(tagkey, mvalue))
            }
        }
    }
mangstadt commented 3 weeks ago

If the vCard contains zero properties or contains invalid data, then this would cause your list to be empty.