Skip to content

Tag: uri

How can i store uri.toString to my java class?

I want to store a uri to my donation.java class so that ill be able to fetch an image from firebase storage and display it on a cardview. However uri.toString is highlighted red and shows a “Cannot resolve constructor ‘donation(java.lang.String)’” donate.java donation.java I’ve tried s…

Nested jar: URI

The format of the jar: URI scheme is simply defined to be jar:<url>!/[<entry>]. Is it possible to “nest” two such URIs together and refer to a file inside an archive inside an archive this way? Something like: This should designate /file inside an archive jar:http://example.com/!/archi…

Turning a string into a Uri in Android

I have a string, ‘songchoice’. I want it to become a ‘Uri’ so I can use with MediaPlayer.create(context, Uri) How can I convert songchoice to the Uri? Answer Here’s the doc http://developer.android.com/reference/android/net/Uri.html#parse%28java.lang.String%29

Creating custom URI scheme using URI class

I need to create a custom URI scheme for my project. i.e urn:myprotocol:{p1}:{p2}:{p3}:{p4} – opaque representation myprotocol://{p1}/{p2}/{p3}/{p4} – hierarchical representation. How can I add my scheme to Java URI class? Or, how can I make Java URI to understand my scheme, so I could use it in m…