Guest User

Untitled

a guest
Jun 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. intent.putExtra("EXTRA_NUMBER", numberAsAString);
  2.  
  3. final Intent intent = new Intent(this, myActivity2.class);
  4. intent.putExtra("phone_number",((EditText)findViewById(R.id.edttxt_input)).getText().toString());
  5. startActivity(intent);
  6.  
  7. String phoneNumber = getIntent().getStringExtra("phone_number");
  8. String uri = "tel:" + phoneNumber;
  9. Intent intent = new Intent(Intent.ACTION_CALL);
  10. intent.setData(Uri.parse(uri));
  11. startActivity(intent);
Add Comment
Please, Sign In to add comment