1 public static boolean shareMultipleToMoments(Activity activity, String text, List<File> files){ 2 3 Intent intent = new Intent(); 4 ComponentName comp = new ComponentName("com.tencent.mm","com.tencent.mm.ui.tools.ShareToTimeLineUI"); 5 intent.setComponent(comp); 6 intent.setAction(Intent.ACTION_SEND_MULTIPLE); 7 intent.setType("image/*"); 8 intent.putExtra("Kdescription",text); 9 10 ArrayList<Uri> imageUris = new ArrayList<Uri>(); 11 for(File f : files){ 12 imageUris.add(Uri.fromFile(f)); 13 } 14 15 intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imageUris); 16 try{ 17 activity.startActivity(intent); 18 } catch (android.content.ActivityNotFoundException e){ 19 return false; 20 } 21 return true; 22 }