Wednesday, May 21, 2014

Incoming SMS Receivers Stop Work Google Hangouts Is Villain

I'm working on an app which notifies a Windows desktop/laptop when a new SMS text message arrives on an Android phone, this app does not do anything else to the text of incoming SMS. It only reads and notifies the laptop using Bluetooth(or WiFi).

My app stopped working all of a sudden, and I didn't know what was wrong. There's a nice blog entry on making your app compatible with Android 4 KitKat, I read it thoroughly but in the end I discovered my will not be affected since it's too benign and only the apps that might cause trouble for other apps.

My sixth sense raised an alarm shortly afterwards, that perhaps this issue is being caused by Google Hangouts. I had allowed Google Hangouts to take care of my SMS messages a few hours ago, without knowing it will screw my poor app.
I got Android 4.3.3 running on Sony Xperia Z smart phone.
Given below are screen shots from Hangouts app settings.

google-hangouts-settingsgoogle-hangouts-settings-subgoogle-hangouts-sms-settings



So, if your SMS receiver stops working all of a sudden do make sure Google Hangouts is not the culprit.
Android KitKat has got its own style of handling SMS messages, but still I don't see a point in why Google Hangouts will break 3rd party apps that need to only read SMS messages.

On a side note, I did think once that maybe this error is caused an up version of Android because my app was working well on my older QMobile A50 which sports Android Jelly Bean 4.1.3.

In case you're wondering what permissions are needed to make a new SMS broadcast receiver work, well I got the following:

<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />




I'm working as a freelance programmer through ODesk.com, I have a strong profile over there. Feel free to ping me if you need an Android app. Elance widget is given on top right of the page, for ODesk follow the link given below:

https://www.odesk.com/users/~012d73aa92fad47188

2 comments:

  1. I'm not sure i understand, I am having similar issues and also have hangouts taking care of my SMS messages but what is hangouts actually doing here? Is it suppressing the broadcast to other apps?

    ReplyDelete
  2. Yes, I think Hangouts is somehow stopping the new SMS intent. As a proof you may disable SMS handling in Hangouts and see if your app gets better or not.

    ReplyDelete

Feel free to talk back...