The size of pdf is shown 0 when attached to gmail

浪子不回头ぞ 提交于 2019-12-06 01:59:55
Marcelo

How are you saving the pdf on that directory?

If you are using the getExternalStorageDirectory (i'm assuming you are), that pdf is private to your application, and can't be accessed by the email app.

If you need to keep that file private to your application, and still be able to share via email, use a ContentProvider : http://developer.android.com/guide/topics/providers/content-provider-creating.html

If you can keep that file on a shared directory, you should use getExternalStoragePublicDirectory(): http://developer.android.com/guide/topics/data/data-storage.html#filesExternal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!