cordova-plugin-sms
cordova-plugin-sms copied to clipboard
body and indexFrom filter not working
Hi floatinghotpot, I am trying to search content from sms inbox and I am having 1000 sms.
I am using the below filter as given in the doc but facing the below issues:
i. "body" filter is not working alone. While I am applying both "address" and "body" it is working as expected. ii. When changing the index value of "indexFrom" filter from 0 to anyother value, it is returning zero result.
var filter = {
box : 'inbox', // 'inbox' (default), 'sent', 'draft', 'outbox', 'failed', 'queued', and '' for all
address : '+8613601234567', // sender's phone number
body : 'This is a test SMS', // content to match
// following 2 filters can be used to list page up/down
indexFrom : 0, // start from index 0
maxCount : 10, // count of SMS to return each time
};
I think this is the issue with the plugin. Please look into the issue and let me know.
body search not working for me as well.
True that @satyapriya. I receive 0 results everytime indexFrom > 0, too! Check my issue at #63
Looking at the source code, the "body" property is used as exact match and not contained by SMS body. Look below:
matchFilter = fcontent.equals(cur.getString(cur.getColumnIndex(BODY)).trim());
@floatinghotpot Can you fix this?