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
Post a Comment