not get sms even when set the highest priority and installed first

后端 未结 2 2231
迷失自我
迷失自我 2021-02-15 14:37

My app does not receive SMS when Go SMS is installed. I set the highest priority and have tried installing my app before installing the Go SMS app. However, Go SMS always get SM

2条回答
  •  爱一瞬间的悲伤
    2021-02-15 15:34

    As the question you are linking to explains, once the GO SMS app's receiver gets called, they can call abortBroadcast(). Assuming they are using the highest priority possible (=2147483647), I would assume that the following snippet from the docs would apply:

    The order receivers run in can be controlled with the android:priority attribute of the matching intent-filter; receivers with the same priority will be run in an arbitrary order.

    However, since they always happen to intercept SMS before your app, I would assume that the magic is somewhere else. Among their permissions, they have the following:

    • "android.permission.PERSISTENT_ACTIVITY"
    • "android.permission.WRITE_SMS"
    • "android.permission.READ_SMS"

    Do you mind trying a combination of these, to see if it affects the ordering of intent resolution?

提交回复
热议问题