I am sending sms to a number from my app. I want to restrict my app to send SMS
second time. How can I do this?
I have tried to uninstall the app but it requires user permission which I don't want.
I have tried this so far but could not get success. Here is my code:
code snippet
registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context arg0, Intent arg1) {
switch (getResultCode()) {
case Activity.RESULT_OK:
SMSisSend = true;
/*how to handle here to restrict to send additional msg.*/
break;
case Activity.RESULT_CANCELED:
break;
}
}
}, new IntentFilter(DELIVERED));