从applist中选择的应用程序获取确认(Intent.ACTION_SEND)

时间:2014-07-30 04:28:05

标签: android onactivityresult

我经历了同样的情况。在我的情况下,我得到空数据(意图),因为下面的代码没有运行

if(requestCode == 0 && resultCode == Activity.RESULT_OK && data != null) 
{
    ComponentName componentName = data.getComponent();
    final String packageName = componentName.getPackageName();
    final String activityName = componentName.getClassName();
} 

任何解决方案?因为每当我通过任何应用程序(Gmail / Facebook)发布文本。响应正在发送消息,或者您的消息由用户选择的应用程序发布。

我想获取用户点击的应用程序名称。

0 个答案:

没有答案