My app is allowed to send only one SMS per day using the default SMS sender ( which is already present in every android device ), as a result, I need to disable send SMS button once the SMS is sent.
What I am doing currently is, whenever a user clicks on send SMS button, I navigate him to the device default message sender like this,
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.fromParts("sms", phoneNumber, null));
intent.putExtra("sms_body", message);
baseActivity.startActivity(intent);
I can only navigate the user to default SMS sender and then from there the user can either send SMS or he can cancel sending SMS ( by pressing back button ), now the question is how will I be notified that the SMS is sent? Is there any callback or receiver mechanism which can tell me that the SMS was sent or SMS was canceled by the user?