step1: 编写分享代码, 将Uri的生成方式改为由FileProvider提供的临时授权路径,并且在intent中添加flag 注意:在Android7.0之后,调用系统分享,传入URI的时候可能会导致程序闪退崩溃.这是由于7.0的新的文件权限导致的.下面的代码对其做了处理 public static int sharePic(Context context, String picFilePath) { File shareFile = new File(picFilePath); if (
以下示例代码展示如何调用系统的文件夹选择对话框: Private Function SelectFolder(ByVal Describe As String, Optional ByVal ShowNewFolder As Boolean = True) As String Using nOpen As New System.Windows.Forms.FolderBrowserDialog() nOpen.Description = Describe nOpen.ShowNewFolderB