在WhatsApp或环聊中,我如何知道用户是否实际共享或取消了共享活动?

时间:2015-05-04 18:07:15

标签: android-intent whatsapp

我有这段代码。

public static void sharedWhatsappOrHandout(Activity destination, String stringShared){
    Intent sendIntent = new Intent();
    sendIntent.setAction(Intent.ACTION_SEND);
    sendIntent.putExtra(Intent.EXTRA_TEXT, stringShared);
    sendIntent.setType("text/plain");
    sendIntent.setPackage("com.whatsapp");
    if (sendIntent != null) {
        destination.startActivity(sendIntent);
    } else {
        sendIntent.setPackage("com.google.android.talk");
        if (sendIntent != null) {
            destination.startActivityForResult(sendIntent,REQUEST_CODE);
        } else {
            Toast.makeText(destination, R.string.error_no_whatsapp, Toast.LENGTH_SHORT)
                .show();
        }
    }

}

我如何知道用户是否实际共享或取消了共享活动?

0 个答案:

没有答案