Uri uri = Uri.parse("http://www.example.com/path"); String uriString = uri.toString();
Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("tel:1234567890")); String uriString = intent.getData().toString();This example creates an intent to make a phone call and sets the data of the intent to the phone number 1234567890. It then calls the toString method on the URI to get the string representation. The android.net.Uri class is part of the Android SDK and is located in the android.net package.