Dave's Brain

Browse - Programming Tips - How do I create a Uri class from a String?

Date: 2014jul7
OS: Android
Language: Java

Q.  How do I create a Uri class from a String?

A.  Like this:

import android.net.Uri; Uri myuri = Uri.parse("http://...");
Note that the Android (mixed case) Uri class is different than the Java (uppercase) URI class.

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.