开发者

Set Contact Number in Contact Uri

开发者 https://www.devze.com 2023-04-04 13:42 出处:网络
In my application i want to add the contact number . So here i called the Below code . It 开发者_开发技巧call the Add contact screen but i want to set the contact number using code . can any one help

In my application i want to add the contact number . So here i called the Below code . It 开发者_开发技巧call the Add contact screen but i want to set the contact number using code . can any one help me to solve my problem ?

Intent intent = new Intent(Intent.ACTION_INSERT,People.CONTENT_URI);
startActivityForResult(intent, 1);

It is called Add Contact Screen .

Set Contact Number in Contact Uri


As far as I know INSERT creates an empty contact. Maybe you can create an entry and then call the action.EDIT pointing to he new contact


Here is the Solution.

Intent addContactIntent = new Intent(Contacts.Intents.Insert.ACTION, Contacts.People.CONTENT_URI);
addContactIntent.putExtra(Contacts.Intents.Insert.PHONE,"Phone Number"); 
startActivity(addContactIntent);
0

精彩评论

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