我想在我的邮件中附上.vcf文件并通过邮件发送.但邮件收到的地址没有附件.我使用下面的代码,但代码为此,我不知道我错在哪里.
try {
String filelocation="/mnt/sdcard/contacts_sid.vcf";
Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, "");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse( "file://"+filelocation));
intent.putExtra(Intent.EXTRA_TEXT, message);
intent.setData(Uri.parse("mailto:"));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
activity.startActivity(intent);
activity.finish();
} catch(Exception e) {
System.out.println("is exception raises during sending mail"+e);
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试将网络链接中的vCard添加到Android 2.2上的用户联系人列表中.当我将用户定向到.vcf文件时,我得到的只是移动浏览器中的文本输出.我已确认使用MIME类型text/v-card传输文件.这看起来应该很简单.有任何想法吗?
我想将手机通讯录导出到外部存储区域.我没有使用这种方法.有人指导我这样做吗?
我的SD卡中有多个vcf文件.我想将这些vcf文件导入我的联系人.
我使用以下代码:
File file = new File(storage_path);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file), "text/x-vcard");
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
通过使用上面的代码,我无法一次导入一个vcf文件.我想一次导入多个vcf文件.通过使用上面的代码我也得到重复的联系人.
除了意图之外,还有其他有效的方法来导入联系人吗?谢谢.
在我的应用程序中,一些联系人被附加到单个.vcf文件并且该文件发送到邮件,尝试在log cat中显示所有联系人数据,但是无法发送附加到单个.vcf文件的所有数据?
任何人都有这个帮助我的想法,请.
这是我的代码
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
vCard = new ArrayList<String>();
Log.i("TAG one", "vfile" +vfile);
vfile = "Contacts" + "_" + System.currentTimeMillis() + ".vcf";
/**
* This Function For Vcard And here i take one Array List in Which i
* store every Vcard String of Every Contact Here i take one Cursor and
* this cursor is not null and its count>0 than i repeat one loop up to
* cursor.getcount() means Up …Run Code Online (Sandbox Code Playgroud) 我正在建立一个移动网站(对于Iphones和Androids ......我认为Blackberry已经不在了)
这是我遇到的问题.我们希望有一个链接,当点击时,会自动将.vcf文件中的联系人添加到移动设备的地址簿中(某些类型的确认,iPhone/Android必须已经自行处理)
我尝试过的解决方案是创建一个直接指向.vcf文件的链接.它没用.我的iTouch甚至询问用什么打开该文件...而且联系人应用程序甚至不在列表中.
我听说过,如果这张卡片来自电子邮件,那么这张卡片就能完全符合我们的要求...事情是,我们正在这里建立一个网页.
我们使用HTML5,没有PhP(还没有,可以在以后添加此问题)并且不涉及CMS.
我试图弄清楚如何使用VObject将VCard解析为Python字典.
vobj=vobject.readOne(string)
print vobj.behavior.knownChildren
Run Code Online (Sandbox Code Playgroud)
这就是我得到的:
{'CATEGORIES': (0, None, None), 'ADR': (0, None, None), 'UID': (0, None, None), 'PHOTO': (0, None, None), 'LABEL': (0, None, None), 'VERSION': (1, 1, None), 'FN': (1, 1, None), 'ORG': (0, None, None), 'N': (1, 1, None), 'PRODID': (0, 1, None)}
Run Code Online (Sandbox Code Playgroud)
如何使用我的VCard数据填充字典?
在我的应用程序中,我想将.vcf文件添加为MFMailComposeViewController中的附件.
iphone attachment objective-c vcf mfmailcomposeviewcontroller
我在我的Android设备上创建了多个联系人vCard VCF文件,我想将其导入到Outlook 2010.似乎Outlook不支持多个联系人VCF文件,只导入这个文件中的第一个联系人.有没有办法将我的1000个联系人从这样的VCF文件导入Outlook 2010?
vcf ×10
android ×5
vcf-vcard ×5
python ×2
attachment ×1
contacts ×1
email ×1
import ×1
iphone ×1
mfmailcomposeviewcontroller ×1
mobile ×1
objective-c ×1
outlook ×1
outlook-2010 ×1