Adding Contact using Intent in Android -


i'm making application in user can add users application contacts.

intent intent = new intent(contactscontract.intents.insert.action); intent.settype(contactscontract.rawcontacts.content_type); intent.putextra(contactscontract.intents.insert.phone, bean.getmobileno()); intent.putextra(contactscontract.intents.insert.name, bean.getname()); intent.putextra(contactscontract.intents.insert.email, bean.getemailid()); startactivity(intent); 

so adding not issue issue when goes add contact screen , if user presses button contact getting saved if user doesn't want save contact.

i want using intent not through app. there solution or device specific?

try this

/** * open add-contact screen pre-filled info */

intent intent = new intent(intent.action_insert); intent.settype(contactscontract.contacts.content_type);  intent.putextra(contactscontract.intents.insert.name, bean.getname()); intent.putextra(contactscontract.intents.insert.phone, bean.getmobileno()); intent.putextra(contactscontract.intents.insert.email, bean.getemailid());  context.startactivity(intent); 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -