I use getAllPerson() function and show all people in TableView i want to do delete selected person. but removePerson() only supported for iphone, how i delete with Android. any suggestion appreciated
I don't know how you implemented the edit action that should remove the selected person, but, I think that, as the removePerson
is not yet implemented (may be never) for Android, you have to use intents.
For this, here are two sources where you can find all the information you have to know:
On by clicking on the person you want to delete, you have to get his contact ID.
Then, here is where I'm not sure at all :
intent: (function() {
var contactId = '1'; // Your contact ID !!!
if (contacts[0]) {
contactId = parseInt(contacts[0].id) + '';
}
var contactUrl = 'content://com.android.contacts/raw_contacts/' + contactId;
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_DELETE,
data: contactUrl
});
return intent;
})()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With