cordova-plugin-sms icon indicating copy to clipboard operation
cordova-plugin-sms copied to clipboard

body and indexFrom filter not working

Open satyapriya opened this issue 8 years ago • 3 comments

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.

satyapriya avatar May 16 '16 06:05 satyapriya

body search not working for me as well.

vikasprogrammer avatar Jul 15 '16 12:07 vikasprogrammer

True that @satyapriya. I receive 0 results everytime indexFrom > 0, too! Check my issue at #63

Kasendwa avatar Mar 14 '17 06:03 Kasendwa

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?

lcamilo avatar Sep 10 '18 20:09 lcamilo