Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How to launch email intent with an attached jpg

How to launch email intent with an attached jpg

All your problems with Audio, Video and Images.

How to launch email intent with an attached jpg

Postby n179911 » Mon Jun 29, 2009 9:01 pm

Hi,

I am trying to launch an email intent with an attached jpg.

I did:
Intent intent4 = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
"mailto", "testemail@gmail.com", null));
startActivity(intent4);

this launches the email activity.

But when I try to add DataAndType (my jpeg attachment). It fails with
android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.SENDTO data=file:///data/data/com.mycompany.mypackage/files/temp-picture type=JPEG
Intent intent4 = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
"mailto", "testemail@gmail.com", null));
intent4.setDataAndType(Uri.parse("file://"
+ mTempFilePath), Bitmap.CompressFormat.JPEG.name());

startActivity(intent4);
n179911
Freshman
Freshman
 
Posts: 2
Joined: Mon Jun 22, 2009 1:30 am

Top

Postby scuba » Fri Nov 20, 2009 8:17 pm

I'm trying to figure out how to launch the email app with the "to" pre-filled. I tried your code and when I get an "Unsupported Action" message on the screen.

Not sure what I'm doing wrong... any ideas?

Thanks!
scuba
Junior Developer
Junior Developer
 
Posts: 19
Joined: Wed Nov 11, 2009 4:19 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: Exabot [Bot] and 24 guests