Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
364 views
in Technique[技术] by (71.8m points)

android - SMS Broadcastreceiver not called when GO SMS Pro installed

I have implemented an SMS receiver which intercepts incoming SMS messages without any issues. However, when I install GO SMS Pro and set "Disable other message notification", then my app does not receive any broadcast message even though I have set the priority on intent filter very high. Is there a way to overcome so that my app always receive a SMS broadcast irrespective of what user does on Go SMS Pro's app, especially since my app does not show any UI pop-up notification? As soon as I uninstall GO SMS Pro, my app starts getting incoming SMS broadcasts and works fine.

Here is the log when an incoming SMS is received and GO SMS Pro is installed. There is some magic done by GO SMS Pro which I don't understand. Can someone explain what is done here and how can I make sure my app does get ordered broadcast notification every time.

07-02 19:52:21.674: INFO/Zygote(25209): Zygote: pid 25209 has INTERNET permission, then set capability for CAP_NET_RAW

07-02 19:52:21.820: INFO/ActivityThread(25209): Publishing provider go-sms: com.jb.gosms.provider.GoSmsProvider

07-02 19:52:21.830: INFO/ActivityThread(25209): Publishing provider go-mms-sms: com.jb.gosms.provider.GoMmsSmsProvider

07-02 19:52:21.834: INFO/ActivityThread(25209): Publishing provider com.jb.gosms.im;com.jb.gosms.chat: 
com.jb.gosms.im.database.ImContentProvider

07-02 19:52:21.842: INFO/ActivityThread(25209): Publishing provider com.jb.gosms.schedule.Schedule: com.jb.gosms.schedule.ScheduleProvider

07-02 19:52:21.846: INFO/ActivityThread(25209): Publishing provider go-mms: com.jb.gosms.provider.GoMmsProvider

07-02 19:52:21.959: DEBUG/dalvikvm(25209): GC_FOR_MALLOC freed 2657 objects / 173112 bytes in 30ms

07-02 19:52:22.182: DEBUG/dalvikvm(25209): Trying to load lib /data/data/com.jb.gosms/lib/libHanzi2Pinyin.so 0x47d4cf70

07-02 19:52:22.182: DEBUG/dalvikvm(25209): Added shared lib /data/data/com.jb.gosms/lib/libHanzi2Pinyin.so 0x47d4cf70

07-02 19:52:22.182: DEBUG/dalvikvm(25209): No JNI_OnLoad found in /data/data/com.jb.gosms/lib/libHanzi2Pinyin.so 0x47d4cf70, skipping init

07-02 19:52:22.186: INFO/Hanzi2Pinyin_Native(25209): InitLib in ver=3141000

07-02 19:52:22.186: INFO/Hanzi2Pinyin_Native(25209): Init in

07-02 19:52:22.186: INFO/Hanzi2Pinyin_Native(25209): file size=155203 

07-02 19:52:22.186: INFO/Hanzi2Pinyin_Native(25209): Init out

07-02 19:52:22.186: INFO/Hanzi2Pinyin_Native(25209): Instance out Init = 21

07-02 19:52:22.186: INFO/Hanzi2Pinyin_Native(25209): InitLib out

07-02 19:52:22.467: DEBUG/dalvikvm(25209): GC_FOR_MALLOC freed 5960 objects / 376104 bytes in 29ms

07-02 19:52:22.815: DEBUG/IMS/Ims3GPP2SmsMessage(25209): IMSLogcreateFromPdu : calling parsePdu

07-02 19:52:22.815: DEBUG/IMS/Ims3GPP2SmsMessage(25209): IMSLogpdu to parse : 000002100202070292A106A85A0008150003100730010610254E9D3A000306110702195220

07-02 19:52:22.815: DEBUG/IMS/Ims3GPP2SmsMessage(25209): IMSLogparseAddress

07-02 19:52:22.815: DEBUG/IMS/Ims3GPP2SmsMessage(25209): IMSLogaddress received :3233292992

07-02 19:52:22.815: DEBUG/IMS/Ims3GPP2SmsMessage(25209): IMSLogbearer data received : 0003100730010610254E9D3A000306110702195220

07-02 19:52:22.815: ERROR/bearer data(25209): bearer data obtained 1

07-02 19:52:22.815: DEBUG/EMS(25209):  messageType is 1 messageId is 115 hasUserDataHeader is false

07-02 19:52:22.858: DEBUG/IMS/Ims3GPP2SmsMessage(25209): IMSLogcreateFromPdu : calling parsePdu
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

"Pretty high" value for priority is just not enough when it comes to Go SMS Pro because they've set their on absolute maximum of 2147483647 (2^31-1). So if you put that value you'll be fine as long as your app is installed before Go SMS Pro is because when on same priority Android OS will pass broadcast to "older" app (This is from my experience, not an official information). If Go SMS Pro is installed prior to your app you should warn your users about the situation. They could configure Go SMS Pro differently or uninstall it and then re install it again so your app can work too.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...