I am trying to send an MMS message like this --

        Intent sendIntent = new Intent(Intent.ACTION_SEND);
        sendIntent.putExtra("sms_body", "hello world");
        sendIntent.setType("vnd.android-dir/mms-sms");
        sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File
(url)));  // I have tried Uri.parse(url) here
        sendIntent.setType("image/*");   // I have tried "image/jpg" and
"impage/jpeg" here...
        startActivity(sendIntent);

The file that I'm trying to send is in my application sandbox.

/data/data/com.myapp.test/files/myco/cache/1234.jpg

However, every time I send the message, I get --

10-16 01:46:51.371: ERROR/MediaModel(3298): IOException caught while
opening or reading stream
10-16 01:46:51.371: ERROR/MediaModel(3298):
java.io.FileNotFoundException: /data/data/com.myapp.test/files/myco/
cache/1234.jpg
10-16 01:46:51.371: ERROR/MediaModel(3298):     at
org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:
231)
10-16 01:46:51.371: ERROR/MediaModel(3298):     at
java.io.FileInputStream.<init>(FileInputStream.java:80)

Is this because the file I'm pointing at is in my local sandbox?  And
if it is, how do I expose it to the MMS app.  I have thought about
copying it to the SD card first, but that seems like a really bad
solution...

Can I have the intent run as thought the person who received it is
me?  (I thought I remembered reading that somewhere...)

tia.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to