btnsendsms.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { phone=edPhone.getText().toString(); Intent sentIntent = new Intent(Intent.ACTION_VIEW); sentIntent.putExtra("address", phone); sentIntent.putExtra("sms_body", "Welcome to Sabir Tailors Shinkiari"); sentIntent.setType("vnd.android-dir/mms-sms"); startActivity(sentIntent); } });
Anonymous new View.OnClickListener() can be replaced with lambda
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)