SMS sent observer executes 3 times

前端 未结 2 2051
梦谈多话
梦谈多话 2020-12-17 02:32

I have defined the following service with an observer of messages sent. The problem is that when sending a message, I sense that is called 3 times onChange method of content

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-17 03:14

    You have kept the Observer for the SMS database through URI. so whenever message is being send the database is updated and 3 of the column of that table is getting updated. so it will notify the observer for each of them. so it is being called for as many times as table data is updated.

提交回复
热议问题