android - Sending Email with mp4 attachment does not work -


i use following code send email mp4 attachment:

           intent email = new intent(intent.action_send);             email.settype("*/mp4");             email.putextra(intent.extra_email, new string[]{to});             email.putextra(intent.extra_subject, subject);             email.putextra(intent.extra_text, message);             file f = new file(record[ipos]);             uri uri = uri.fromfile(f);             email.putextra(intent.extra_stream, uri);             startactivity(intent.createchooser(email, "select email client")); 

the values of f , uri equals:

f = {java.io.file@830047473992} "data/data/com.example.bernard.speechparole/files/5-auth.mp4" uri = {android.net.uri$hierarchicaluri@830047488248} "file:///data/data/com.example.bernard.speechparole/files/5-auth.mp4" 

i select yahoo client: shows in client (yahoo) right file attached file size. works fine, never receive email (i've checked spam folder). when send email without attachment (i remove attachment client), works fine , receive email.

i select gmail client: email shows proper attachment file name no file size. "couldn't send attachment". receive email no attachment.

any appreciated!


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -