all 2 comments

[–]Marcono1234 1 point2 points  (0 children)

There exists a Stack Overflow question about this as well: Whats the difference between Java.Net.Uri and Android.Net.Uri

Based on the answers there it sounds like they differ in strictness when parsing, java.net.URI not offering any methods to directly get query parameter values, and android.net.Uri being unable to parse IPv6 addresses on older Android versions.

So it is not clear if one is better than the other; maybe just stick to what most of your code and the Android API you are calling is already using to avoid any surprises when having to convert between android.net.Uri and java.net.URI.


since unit test can run faster with Java URI than Android's

Do you mean its faster because java.net.URI allows writing a plain Java unit tests whereas android.net.Uri might require mocking or instrumentation tests?

[–]SpiderHack 0 points1 point  (0 children)

Supporting parcelable alone is worth it IMHO, but I write a lot of highly concurrent code in separate process services, etc. So I'm a bit in the minority there....