shounakmulay / Telephony

Flutter plugin for telephony features like query device sms directory, listen for incoming messages, retrieve various network parameters, etc.
https://telephony.shounakmulay.dev
MIT License
138 stars 126 forks source link

Date, DateSent, SmsId, everyhting is NULL for sms returned by getInboxSms() #107

Closed ayush-12 closed 3 years ago

ayush-12 commented 3 years ago

I used the below code to get the SMS from the inbox I got the list of the SMS but the object for SMSMesssage values for date, dateSent, smsId everything is coming as null. Is there something I did wrong or it is not available to the object?

List<SmsMessage> messages = await telephony.getInboxSms( columns: [SmsColumn.ADDRESS, SmsColumn.BODY], filter: SmsFilter.where(SmsColumn.BODY) .like('%requested%') .and(SmsColumn.DATE_SENT) .greaterThanOrEqualTo(f.millisecondsSinceEpoch.toString()), sortOrder: [ OrderBy(SmsColumn.DATE_SENT, sort: Sort.DESC), OrderBy(SmsColumn.BODY) ]);