I am trying to get the path or a URL I intercept from my app.
Sample URL: http://myapp.com/foo/bar/145
I am trying to get: /foo/bar/145
Uri data = getIntent().getData();
String path = data.getPath() // gives "/"
How can I get /foo/bar/145
?
.toString()
method will return complete url as a simple String, if you need URL instance, then you can use new URL(uriPath.toString())
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With