简体   繁体   English

从我的应用程序中调用(启动)其他应用程序(如whatsapp)所需的权限是什么

[英]What are permissions required to call(launch) other apps like whatsapp in my case from our app

My code: 我的代码:

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();

You need to verify if the activity of another app that you are willing to run is exported or not. 您需要验证是否要导出您愿意运行的其他应用程序的活动。 The launcher activity of whatsapp is surely exported so you probably don't need any permission. whatsapp的启动器活动肯定会导出,因此您可能不需要任何权限。

You do not need any permission, you can just launch it through an intent. 您不需要任何权限,只需通过意图启动即可。 Pay attention, in some cases this might lead to app being refused from the Store (If you invoke another app - like whatsapp - since it might not be fully permitted by whatsapp) 请注意,在某些情况下,这可能导致应用程序被拒绝从商店(如果您调用另一个应用程序 - 如whatsapp - 因为它可能不被whatsapp完全允许)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从我的应用程序内部安装应用程序,例如 Play 商店 - How to install apps from inside my app like play store 如何对我的应用进行编码以从其他应用接收内容 - How to code my app to receive content from other apps 将其他应用程序的图像共享到我的应用程序 - Sharing image from other apps unto my app 应用程序可以打开其他应用程序,并且就像查看器一样 - App to open other apps and that act like a viewer 其他客户端调用Java Web服务需要什么? - What is required to call java webservice by other clients? 部分地从URL加载图像,就像WhatsApp中实现的一样 - Loading images from URL partially, just like what is implemented in WhatsApp 如何通过特定联系人从其他应用程序打开Whatsapp? - How to open Whatsapp from other app with a specific contact? 我想通过 whatsapp 从我的应用程序发送音频文件,但每次出现异常时。 我做错了什么? - I want to sent an audio file from my app via whatsapp but everytime I get an exception. What did I do wrong? 如何在其他应用程序上显示图像(例如 YourHour 应用程序中的计时器)? - how to display a image over other apps(like timer in YourHour app)? 如何从WhatsApp到Android中的我的应用程序获取pdf文件数据? - How to get pdf file data from whatsapp to my app in android?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM