开发者

Adding a contact via adb or monkeyrunner

Does anyone know if there is a way to add a contact via adb or monkeyrunner?

Using

device.shell("am start -a android.intent.action.ACTION_INSERT -t ContactsContract.Contacts.CONTEN开发者_高级运维T_TYPE -e ContactsContract.Intents.Insert.NAME "+name+" ContactsContract.Intents.Insert.PHONE "+number)

does not work for me


Use something like this:

device.shell("am start -a android.intent.action.INSERT -t vnd.android.cursor.dir/contact -e name 'Donald Duck' -e phone 555-1234")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜