我們有具有移動客戶端和服務器應用程序的應用程序。移動客戶端安裝在僅支持vCard 2.1發送和接收的Symbian OS S60中。 在服務器端應用程序中,我使用cardme 0.2.5。它正在從手機接收vCard版本2.1,並將其作爲版本2.1正確保存在數據庫中。如何使用cardme將vCard 3.0轉換爲2.1
問題是當我編輯在服務器應用程序的任何接觸新的電子名片被保存在3.0版本,並且在服務器與移動設備同步,因爲它只支持2.1
移動設備無法剖析vCard 3.0正確雖然做研究,我發現,在VCardWriter不能在名片版本寫回2.1
public void setOutputVersion(VCardVersion outputVersion) throws VCardException {
if(outputVersion == null) {
this.outputVersion = VCardVersion.V3_0;
}
else {
if(outputVersion == VCardVersion.V2_1 || outputVersion == VCardVersion.V4_0) {
throw new VCardException("Version "+outputVersion+" not supported.");
this.outputVersion = outputVersion;
}
}
反正我們可以寫出對象返回到vCard 2.1版
我一直在使用其他Ĵ嘗試ar版本,但發現從cardme 2.0開始,它只能寫入vCard 3.0。舊版本不支持在vCard中添加照片。
任何幫助或建議,將受到歡迎
感謝