0

I have a problem in getting a string and parsing it using Uri.parse() method.

I tried the following code:

EditText edit = (EditText) findViewById(R.id.enter);
String telephone = edit.getText().toString();
Uri number = Uri.parse(telephone);

but the application force closed.

0

1 Answer 1

5

you have to add the "tel:" prefix to your mobile number.

Sign up to request clarification or add additional context in comments.

2 Comments

@DeX3 sorry for the misunderstanding. Thank you
@gmendes: If the above answer was the one you was looking for, make sure you do not forget to Mark it as the correct answer, so your question appears as resolved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.