Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/181.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何将第三方应用程序(Gmail/Email/Message/WhatsApp)的响应返回到我们的应用程序_Android - Fatal编程技术网

Android 如何将第三方应用程序(Gmail/Email/Message/WhatsApp)的响应返回到我们的应用程序

Android 如何将第三方应用程序(Gmail/Email/Message/WhatsApp)的响应返回到我们的应用程序,android,Android,如何将第三方应用程序(Gmail/Email/Message/WhatsApp)的响应返回到我们的应用程序,该应用程序中的消息是否已发送/取消 我正在使用第三方应用程序(Gmail/Email/Message/WhatsApp)发送消息。 通过调用带有intent.ACTION\u SENDACTION的隐式intent Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.p

如何将第三方应用程序(Gmail/Email/Message/WhatsApp)的响应返回到我们的应用程序,该应用程序中的消息是否已发送/取消

我正在使用第三方应用程序(Gmail/Email/Message/WhatsApp)发送消息。 通过调用带有
intent.ACTION\u SEND
ACTION的隐式intent

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "Message need to send");
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Connect invitation");
sendIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{email});
sendIntent.setType("text/plain");

Intent intent = Intent.createChooser(sendIntent,"Send To");
startActivityForResult(intent, 1001);

从上面的代码中,我总是在活动结果的
中得到
resultCode
0,对于每种情况,即消息是发送取消或用户刚从第三方应用程序返回。
1001

尝试此链接可能的重复,除非某些应用程序以这种方式工作,否则不可能。。在这里,您完全依赖于某个应用程序将结果发送回。。