How to share a file in Android programmatically

前端 未结 4 1228
旧时难觅i
旧时难觅i 2020-12-28 19:28

I want to share a file(.pdf,.apk etc) using share Intent, I searched google but I find only the code for sharing Image

Intent sharingIntent = new Intent(Inte         


        
4条回答
  •  忘掉有多难
    2020-12-28 20:26

    You use the same code, you just change the MIME type for the type of data you wish to share. If you wish to share anything regardless of type, use */*

提交回复
热议问题