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

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

热度:95   发布时间:2016-05-01 21:21:13.0
能不能不通过Intent.createChooser()直接把数据分享给某个程序?
现在我想把某些数据直接分享给某个第三方的App,如果只是用Intent去启动它,intent.putExtra()这个函数不起作用,运行起来不能把数据分享过去,只是单纯的启动App。

------解决方案--------------------
ComponentName cn = new ComponentName(packagename, activity)
Intent.setComponentName( cn )
  相关解决方案