我的代码:

Button buton = (Button) findViewById(R.id.button);

buton.setOnClickListener(new View.OnClickListener() {


public void onClick(View arg0) {

   Intent inte = getPackageManager().getLaunchIntentForPackage("com.whatsapp");
   if (inte != null)
      startActivity(inte);
   else
      toast.show();

最佳答案

您需要验证是否要导出其他应用程序的活动。
whatsapp的启动器活动肯定已导出,因此您可能不需要任何许可。

关于java - 从我们的应用中调用(启动)其他应用(例如whatsapp)需要什么权限,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42790357/

10-10 22:44