In meiner APP teile ich Text über whatsapp es funktioniert gut. Aber nach der Freigabe muss der Text erfolgreich eine Person oder eine freigegebene Gruppendetails von onActivityResult in android erhalten.Teilen Sie Text mit whatsapp mit Absicht und erhalten Sie Kontaktadresse der geteilten Person
Unter Code versuche ich.
Intent whatsappIntent = new Intent(Intent.ACTION_SEND);
whatsappIntent.setType("text/plain");
whatsappIntent.setPackage("com.whatsapp");
whatsappIntent.putExtra(Intent.EXTRA_TEXT, "The text you wanted to share");
try {
activity.startActivity(whatsappIntent);
} catch (android.content.ActivityNotFoundException ex) {
ToastHelper.MakeShortText("Whatsapp have not been installed.");
}
Zunächst sollten Sie mit 'startActivityForResult()' beginnen und dann prüfen, ob whatsapp diese Informationen tatsächlich als 'intent' zurückgibt. –