mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Issue 294, don't actually generate nonstandard ORG value for MECARD
git-svn-id: https://zxing.googlecode.com/svn/trunk@1147 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
a1083bebd4
commit
2604ca4348
|
@ -53,7 +53,7 @@ public class ContactInfoGenerator implements GeneratorSource {
|
||||||
|
|
||||||
public String getText() throws GeneratorException {
|
public String getText() throws GeneratorException {
|
||||||
String name = getNameField();
|
String name = getNameField();
|
||||||
String company = getCompanyField();
|
//String company = getCompanyField();
|
||||||
String tel = getTelField();
|
String tel = getTelField();
|
||||||
String url = getUrlField();
|
String url = getUrlField();
|
||||||
String email = getEmailField();
|
String email = getEmailField();
|
||||||
|
@ -64,15 +64,15 @@ public class ContactInfoGenerator implements GeneratorSource {
|
||||||
// Build the output with obtained data.
|
// Build the output with obtained data.
|
||||||
// note that some informations may just be "" if they were not specified.
|
// note that some informations may just be "" if they were not specified.
|
||||||
//return getVCard(name, company, tel, url, email, address, memo);
|
//return getVCard(name, company, tel, url, email, address, memo);
|
||||||
return getMeCard(name, company, tel, url, email, address, address2, memo);
|
return getMeCard(name, tel, url, email, address, address2, memo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getMeCard(String name, String company, String tel, String url,
|
private String getMeCard(String name, String tel, String url,
|
||||||
String email, String address, String address2, String memo) {
|
String email, String address, String address2, String memo) {
|
||||||
StringBuilder output = new StringBuilder();
|
StringBuilder output = new StringBuilder();
|
||||||
output.append("MECARD:");
|
output.append("MECARD:");
|
||||||
output.append("N:").append(name).append(';');
|
output.append("N:").append(name).append(';');
|
||||||
maybeAppend(output, "ORG:", company);
|
//maybeAppend(output, "ORG:", company); // Not standard; don't generate
|
||||||
maybeAppend(output, "TEL:", tel);
|
maybeAppend(output, "TEL:", tel);
|
||||||
maybeAppend(output, "URL:", url);
|
maybeAppend(output, "URL:", url);
|
||||||
maybeAppend(output, "EMAIL:", email);
|
maybeAppend(output, "EMAIL:", email);
|
||||||
|
|
Loading…
Reference in a new issue