How to save the delivery status of SMS in Default SMS Table in Android -


i developing android application sending sms. after sending sms update default sms table.

contentvalues values = new contentvalues(); values.put("address", address); values.put("body", msg); values.put("type", 2); values.put("date", date); getcontentresolver().insert(uri.parse("content://sms/sent"), values); 

but not know how keep it, when comes delivery report. grateful ideas.

after receiving delivery report update sms default table , retain status of delivery. example, when sms has been sent, column "type = 2". how record delivering sms? sorry bad english. thank you

there column in sms table named delivery_status. in addition previous fields, should fill when comes delivery report. have saw filled 2 value. notice of phone doesn't have , instead of there delivery_date column should put current time.

public static int updatesmsstatus(uri smsuri, int status, int delivery_status) {     contentvalues values = new contentvalues();     values.put("status", status);     values.put("delivery_status", delivery_status);     return g.getcontext().getcontentresolver().update(smsuri, values, null, null); } 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -