I am trying to send SMS from within a service but the following error is thrown. The service Java file has been attached with the error code. Need assistance for the service as the service is not able o send the SMS.
I want to know if there is some way in which i can give permission to the service for sending the SMS or in any way i can complete the same.
Sending SMS message: uid 10235 does not have android.permission.SEND_SMS.
My Code is as follows :-
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(num1, null, sms_message+"", null, null);
smsManager.sendTextMessage(num2, null, sms_message+"", null, null);
smsManager.sendTextMessage(num3, null, sms_message+"", null, null);
My Manifest File is show below
<uses-permission android:name="android.permission.SEND_SMS" />