user2682362
user2682362

Reputation: 1

Sending SMS does not work on all devices

Here is my code:

SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(phoneNumber, null, message, null, null);

And in the manifest:

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

I tried it on an LG and it works perfectly, but on a Galaxy, it does not work.

What could be the problem? Maybe hardware?

Upvotes: 0

Views: 199

Answers (1)

user4472716
user4472716

Reputation:

I believe you are also getting messages or reading messages in you application. If so then please add following to your manifest also:

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

Upvotes: 1

Related Questions