如何在android模拟器上添加联系人?
我正在尝试编写我的第一个 Android 应用程序。它涉及联系人和联系人组。为了在模拟器上进行测试,我尝试将群组联系人添加到模拟器中。如果我尝试手动添加它们,它会遍历整个联系人对话框,我单击完成,它就会消失,但实际上不会保存联系人。
我尝试将手机同步到测试 Gmail 帐户,但经过一番研究后,我发现这也不起作用,因为需要唯一的 IMEI 号码。
所以我找到了一个线程,说在 gmail.com 中创建联系人,然后将它们导出到 vcf 文件并使用 adb 将它们推送到模拟器,然后将它们导入到 Contacts
中。我尝试了此操作,文件复制成功,然后我运行了导入,其中显示了进度条和正在导入的联系人姓名。看起来好像有效,但随后它返回到“联系人”,并没有实际将它们保存到数据库中。
那么,有什么方法可以将群组联系人添加到模拟器中吗?或者我是否需要构建 apk 并在我的手机上实际测试它?
I'm trying to write my first android app. It deals with contacts and contact groups. In order to test on the emulator, I'm trying to add contacts with groups to the emulator. If I try to add them manually, it goes through the whole contact dialog, I click done and it goes away but doesn't actually save the contact.
I tried syncing the phone to a test gmail account, but after poking around, I see that doesn't work either because of an issue with needing a unique IMEI number.
So I found a thread which said create the contacts in gmail.com, then export them to a vcf file and use adb to push them to the emulator and then import them into Contacts
. I tried this, the file copied over okay, and I ran the import, which showed a progress bar and the contact names being imported. It looked like it worked, but then it goes back to Contacts
and did not actually save them into the database.
So, is there ANY way to add contacts with groups into the emulator? Or do I need to build the apk and test it actually on my phone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
还有一件事可能会隐藏您的联系方式。我必须更改显示选项以显示所有联系人。
There is another thing that might hide your contact. I have to change display option to show all contact.
检查模拟器中是否有虚拟 SD 卡(= 使用虚拟 SD 卡创建了设备)。您的错误可能是因为您的模拟器因缺少 SD 卡而无法存储数据。
Check you've a virtual sdcard in your emulator (= created a device with an virtual sdcard). Your error might be because your emulator cannot store the data because of a missing sdcard.