2010-12-01 64 views

回答

2

給用戶的所有應用程序的選擇是「共享」的Twitter,電子郵件等使用

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

優秀。這正是我要找的。謝謝 – 2010-12-02 22:13:30

相關問題