react-native-get-sms-android
react-native-get-sms-android copied to clipboard
delete message
how to delete message in use this module?
if (responses.status === 200) {
messages.forEach((obj) => {
console.log(obj.type)
SmsAndroid.delete(

obj._id,
(fail) => {
console.log('Failed with this error: ' + fail);
},
(success) => {
console.log('SMS deleted successfully');
},
);
})
}
}, 1000);
//error LOG 1 // obj._id LOG Failed with this error: SMS not found //this error help me\
Hi @Updour
Apologies for the delay, was off for a while. Going to look into this and get back to you.
Hi @Updour. From the screenshot, I see that it's saying SMS Not Found.
Could you show the code of how you are accessing the specific message that you are going to delete?
i.e this section
SmsAndroid.delete(
_id,
(fail) => {
console.log('Failed with this error: ' + fail);
},
(success) => {
console.log('SMS deleted successfully');
},
);
yes of course this code only runs on the Android version of Jelly Bean ?? because there this code works well,
this code https://pastebin.com/89CC3zKw
Ah I think I know what the issue is.

You can check out the whole thread here: https://stackoverflow.com/questions/8614211/deleting-android-sms-programmatically
That's the reason why it works on Jellybean and not on any later versions.
I thought this was in the docs; I think I'll have to update the README to make the distinction
well, I hope there is a new README in the future, and thank you for the answer to this,
So, is it still running on Jelly Bean right ??
Yes. You should be able to delete the message on Jelly Bean.