我可以使用以下代码将TikTok打开到用户的个人资料,但是如何打开TikTok进入其主页?
Uri uri = Uri.parse("https://vm.tiktok.com/"+"tiktokExtension");
Intent tiktokIntent = new Intent(Intent.ACTION_VIEW, uri);
tiktokIntent.setPackage("com.zhiliaoapp.musically");
startActivity(tiktokIntent);
答案 0 :(得分:0)
您以这种方式启动tiktok应用程序:
try{
Intent intent = new Intent("com.zhiliaoapp.musically");
startActivity(intent);
}catch(ActivityNotFoundException e){
//if the app doesn't exist do some stuff , like redirection to playstore.....
}