 <p>The issue might be that you are trying to Uri encode an already Uri encoded string.</p> <p>As per the Intent class documentation for the toUri() method:</p> <blockquote> <p>Convert this Intent into a String holding a URI representation of it. The returned URI string has been properly URI encoded, so it can be used with <strong>Uri.parse(String)</strong>. The URI contains the Intent's data as the base URI, with an additional fragment describing the action, categories, type, flags, package, component, and extras.</p> </blockquote> <p>So try:</p> <pre><code>String finaldata = Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)); </code></pre>