You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1.Using Vcard jar
2.
3.
What is the expected output? What do you see instead?
preparation of vcard file
What version of the product are you using? On what operating system?
vcard 1.4, windows
Please provide any additional information below.
code: getContentResolver().applyBatch(ContactsContract.AUTHORITY,
ops);
Toast.makeText(getBaseContext(),
"Contact is successfully added", Toast.LENGTH_SHORT)
.show();
OutputStreamWriter writer = new OutputStreamWriter(
new FileOutputStream(getFilesDir() + File.separator + "contacts.vcard"), "UTF-8");
VCardComposer composer = new VCardComposer();
//create a contact
ContactStruct contact1 = new ContactStruct();
/* contact1.name = "Neo";
contact1.company = "The Company";
contact1.addPhone(Contacts.Phones.TYPE_MOBILE, "+123456789", null, true);
//create vCard representation
String vcardString = composer.createVCard(contact1, VCardComposer.VERSION_VCARD30_INT);
//write vCard to the output stream
writer.write(vcardString);
writer.write("\n"); //add empty lines between contacts
// repeat for other contacts
// ...
writer.close();*/
} catch (RemoteException e) {
e.printStackTrace();
} catch (OperationApplicationException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();/*
} catch (VCardException e) {
e.printStackTrace();*/
}
}
Original issue reported on code.google.com by [email protected] on 13 Dec 2012 at 9:13
Original issue reported on code.google.com by
[email protected]
on 13 Dec 2012 at 9:13Attachments:
The text was updated successfully, but these errors were encountered: