title: How to create Android Uri with hashtag in the center
body: <p>I have the following Uri I want to construct.</p>
  
  <pre><code>https://www.example.com/sub/#/action?firstparam=123456&amp;secondparam=abcdef
  </code></pre>
  
  <p>I use the Android <a href="https://developer.android.com/reference/android/net/Uri.Builder" rel="nofollow noreferrer">Uri.Builder</a> to construct the Uri</p>
  
  <pre><code>Uri uri = new Uri.Builder().scheme(HTTPS_SCHEME).authority("www.example.com").appendPath("sub").appendPath("#").appendPath("action")appendQueryParameter(
              "firstparam", first).appendQueryParameter("secondparam", second).build();
  </code></pre>
  
  <p>But the hashtag is encoded and will result in the following Uri</p>
  
  <pre><code>https://www.example.com/sub/%23/action?firstparam=123456&amp;secondparam=abcdef
  </code></pre>
  
  <p>How to prevent this? I tried using <code>fragment</code> but it adds the hashtag at the end of the Uri.</p>