Home > Back-end >  Share files to WeChat suffix.. bin
Share files to WeChat suffix.. bin

Time:10-13

Share files. (DWG) file format of the drawing, the secondary share to WeChat added. DWG.. Bin suffix, this problem bothering me for a long time, could you tell me what the reason and solution, so thank you,
Try {
if (! File. The exists ()) return;//return
check failed to open the fileIntent Intent=new Intent (Intent. ACTION_SEND);
Intent. SetType (" application/octet - stream ");
//intent. PutExtra (intent. EXTRA_STREAM, Uri fromFile (file));
Intent. PutExtra (intent. EXTRA_STREAM, FileProvider getUriForFile (activity, "FileProvider", file));
Intent. SetFlags (intent. FLAG_ACTIVITY_NEW_TASK);
Activity. StartActivity (Intent. CreateChooser (Intent, activity. Get string (R.s tring. Share)));//"share"
} the catch (Exception e) {
E.p rintStackTrace ();
}
}
  • Related