title: How to download tiktok video without watermark Android java
body: <p>**can anyone guide me on how to download TikTok videos without watermark, I was using the old method but that is not working now. Now as tiktok changed there method so it is not working I even found a way to get the URL with a watermark but it gives access denied eg. URL</p>
  <p><a href="https://v16-web-newkey.tiktokcdn.com/5c8801735eeb489ad3c0b2af7010aec5/5f6d9749/video/tos/alisg/tos-alisg-pve-0037/2ee73819ae364f6f989c058a40763879/?a=1988&amp;br=3656&amp;bt=1828&amp;cr=0&amp;cs=0&amp;cv=1&amp;dr=0&amp;ds=3&amp;er=&amp;l=202009250107420101151510441819C37F&amp;lr=tiktok_m&amp;mime_type=video_mp4&amp;qs=0&amp;rc=M2h2b3A4aXc4dzMzOTczM0ApNzo3NDg7aDs5NzZlNThnZGdhc2lnZG9hNF9fLS1fMTRzczNjLmAxMjIwMmM0YDRgYl46Yw%3D%3D&amp;vl=&amp;vr=" rel="nofollow noreferrer">https://v16-web-newkey.tiktokcdn.com/5c8801735eeb489ad3c0b2af7010aec5/5f6d9749/video/tos/alisg/tos-alisg-pve-0037/2ee73819ae364f6f989c058a40763879/?a=1988&amp;br=3656&amp;bt=1828&amp;cr=0&amp;cs=0&amp;cv=1&amp;dr=0&amp;ds=3&amp;er=&amp;l=202009250107420101151510441819C37F&amp;lr=tiktok_m&amp;mime_type=video_mp4&amp;qs=0&amp;rc=M2h2b3A4aXc4dzMzOTczM0ApNzo3NDg7aDs5NzZlNThnZGdhc2lnZG9hNF9fLS1fMTRzczNjLmAxMjIwMmM0YDRgYl46Yw%3D%3D&amp;vl=&amp;vr=</a></p>
  <p>this website works fine <a href="https://tiktok.codespikex.com/" rel="nofollow noreferrer">https://tiktok.codespikex.com/</a></p>
  <p>here is the old method code.**</p>
  <pre><code>  @SuppressLint(&quot;StaticFieldLeak&quot;)
  private class Data extends AsyncTask&lt;String, String, String&gt; {
  
      @Override
      protected String doInBackground(String... strings) {
          HttpURLConnection connection;
          BufferedReader reader;
          try {
  
              if (!fromService) {
  
                  pd.dismiss();
              }
              URL url = new URL(strings[0]);
              connection = (HttpURLConnection) url.openConnection();
              connection.connect();
  
  
              InputStream stream = connection.getInputStream();
  
              reader = new BufferedReader(new InputStreamReader(stream));
  
              StringBuilder buffer = new StringBuilder();
              String Line;
  
              if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.N) {
                  Log.e(&quot;Hello_myurl_is0 &quot;, String.valueOf(reader.lines()));
              }
              while ((Line = reader.readLine()) != null) {
                  Log.e(&quot;Hello_myurl_is &quot;, Line);
                  if (Line.contains(&quot;videoData&quot;)) {
  
  
                      Line = Line.substring(Line.indexOf(&quot;videoData&quot;));
                      Log.e(&quot;Hello_myurl_is1 &quot;, Line);
                      Line = Line.substring(Line.indexOf(&quot;urls&quot;));
                      Log.e(&quot;Hello_myurl_is2 &quot;, Line);
                      VideoTitle = Line.substring(Line.indexOf(&quot;text&quot;));
                      if (VideoTitle.contains(&quot;#&quot;)) {
                          VideoTitle = VideoTitle.substring(ordinalIndexOf(VideoTitle, &quot;\&quot;&quot;, 1) + 1, ordinalIndexOf(VideoTitle, &quot;#&quot;, 0));
                      } else {
                          VideoTitle = VideoTitle.substring(ordinalIndexOf(VideoTitle, &quot;\&quot;&quot;, 1) + 1, ordinalIndexOf(VideoTitle, &quot;\&quot;&quot;, 2));
                      }
                      System.out.println(&quot;myvideo titljklfjdfd &quot; + VideoTitle);
                      Line = Line.substring(ordinalIndexOf(Line, &quot;\&quot;&quot;, 1) + 1, ordinalIndexOf(Line, &quot;\&quot;&quot;, 2));
                      Log.e(&quot;Hello_myurl_is3 &quot;, Line);
                      if (!Line.contains(&quot;https&quot;)) {
                          Line = Line.replace(&quot;http&quot;, &quot;https&quot;);
                      }
                      Log.e(&quot;Hello_myurl_is4 &quot;, Line);
  
                      buffer.append(Line);
                      break;
                  }
              }
              return buffer.toString();
          } catch (Exception e) {
              if (!fromService) {
  
                  pd.dismiss();
              }
              return &quot;Invalid Video URL or Check Internet Connection&quot;;
          }
      }
  
      @Override
      protected void onPostExecute(String s) {
          super.onPostExecute(s);
          if (URLUtil.isValidUrl(s)) {
              String path = createDirectory();
              if (VideoTitle == null || VideoTitle.equals(&quot;&quot;)) {
                  VideoTitle = &quot;TiktokVideo&quot; + new Date().toString() + &quot;.mp4&quot;;
              } else {
                  VideoTitle = VideoTitle + &quot;.mp4&quot;;
              }
              File newFile = new File(path, VideoTitle);
  
  
              new downloadFile().Downloading(context, s, VideoTitle, &quot;.mp4&quot;);
     
          } else {
              if (Looper.myLooper() == null)
                  Looper.prepare();
              Toast.makeText(context, s, Toast.LENGTH_SHORT).show();
              Looper.loop();
          }
      }
  }
  </code></pre>