2010-12-01 4 views

Répondre

2

pour donner à l'utilisateur un choix de toutes les applications que 'partager' twitter, email, etc utiliser ce

public static void launchNewShareIntent(Context c, String subject, String text, String dialogTitle){ 
     Intent shareintent = new Intent(Intent.ACTION_SEND); 
     shareintent.putExtra(Intent.EXTRA_SUBJECT, subject); 
     shareintent.putExtra(Intent.EXTRA_TEXT, text); 
     shareintent.setType("text/plain"); 
     shareintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
     c.startActivity(Intent.createChooser(shareintent, dialogTitle)); 
} 
+0

excellent. C'est ce que je cherchais. Merci –