4

I need to share a video Uri to tik-tok, instagram, youtube where I am able to share to instagram and youtube by just putting Intent.EXTRA_STREAM, but this is not working for tik-tok. our gallery app can share data to tik-tok so it is damn possible to do so.

Intent sharingIntent = new Intent(Intent.ACTION_SEND);

sharingIntent.putExtra(Intent.EXTRA_STREAM, mediaUri);

sharingIntent.setType("video/*");
sharingIntent.setPackage("com.zhiliaoapp.musically");
startActivity(sharingIntent);

just opening tik-tok app, not redirecting to the sharing procedure, can be compared with gallery

MD Naseem Ashraf
  • 1,030
  • 2
  • 9
  • 22
Gopal sharma
  • 43
  • 1
  • 5

1 Answers1

1

Share to TikTok by using ShareSheet

   Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, uriToImage);
shareIntent.setType("video/*");
startActivity(Intent.createChooser(shareIntent, getResources().getText(R.string.send_to)));

More description here:https://developers.tiktok.com/doc/video-kit-sharesheet-sharesheet-for-android