When I applied your .app code, it is possible to return to action correctly
public void Ok(View v){ String sentSMS = "asd"; String cellNumber = "123"; Intent sendIntent = new Intent(Intent.ACTION_SENDTO); sendIntent.setData(Uri.parse("sms:" + cellNumber)); sendIntent.putExtra("sms_body", sentSMS); sendIntent.putExtra("exit_on_sent",true); startActivityForResult(sendIntent,1001); } @Override public void startActivityForResult(Intent intent, int requestCode, Bundle options) { super.startActivityForResult(intent, requestCode, options); if (requestCode==1001) Toast.makeText(this,"hai",Toast.LENGTH_SHORT).show(); }
This is what I have tried so far. I launched the application on the device with lollipop and after sending the message the control will return to our application.
source share