当前位置: 代码迷 >> Android >> 能不能不通过Intent.createChooser()直接把数据分享给某个程序?解决办法
  详细解决方案

能不能不通过Intent.createChooser()直接把数据分享给某个程序?解决办法

热度:72   发布时间:2016-04-28 05:51:58.0
能不能不通过Intent.createChooser()直接把数据分享给某个程序?
现在我想把某些数据直接分享给某个第三方的App,如果只是用Intent去启动它,intent.putExtra()这个函数不起作用,运行起来不能把数据分享过去,只是单纯的启动App。
------解决方案--------------------
ComponentName cn = new ComponentName(packagename, activity)
Intent.setComponentName( cn )
  相关解决方案