9
Sto condividendo le mie immagini tramite WhatsApp - ma devo scegliere il destinatario. Ecco il mio codice:Invio dell'immagine tramite WhatsApp a un destinatario specifico (Android)
public static void shareImage(Context context,String path, String text, String otherAppPackage){
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/*");
share.setPackage("com.whatsapp");
share.putExtra(android.content.Intent.EXTRA_SUBJECT, getSubject(context));
if (text!=null){
share.putExtra(Intent.EXTRA_TEXT,text);
}
if (path!=null){
share.putExtra(Intent.EXTRA_STREAM,
Uri.fromFile(new File(path)));
}
context.startActivity(Intent.createChooser(share, context.getString(R.string.share_via)));
}
mi wold piace condividere con qualcuno direttamente. Qualcuno di voi sa come posso fare questo. Grazie
possibile duplicato del [Invio messaggio attraverso WhatsApp] (http://stackoverflow.com/questions/15462874/sending- message-through-whatsapp) – rds
trovato qualcosa? –