I have used the sms permission in manifest file for sending the sms in offline by using sms manager but google didn't accept the declartion form which i have checked the device automation or default sms handler or default assistant handler, so the app has been rejected most of the times from the play store.
How to handle this problem because I have to use the sms in the app.
Please help me to find the solution. Thanks in advance
Manifest:
<uses-permission android:name="android.permission.SEND_SMS" />
Code:
SmsManager sms = SmsManager.getDefault();
ArrayList<String> parts = sms.divideMessage(message);
ArrayList<PendingIntent> sendList = new ArrayList<>();
sendList.add(sentPI);
ArrayList<PendingIntent> deliverList = new ArrayList<>();
deliverList.add(deliveredPI);
sms.sendMultipartTextMessage(phoneNumber, null, parts, sendList, deliverList);
Toast.makeText(context, "SMS sent.",
Toast.LENGTH_LONG).show();
//we unsubscribed in 10 seconds
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
context.unregisterReceiver(smsUtils);
}
}, 10000);