Mike,
I can do a little more than that, I can give you a fully working unit
test with the phone number pre-populated in the From: field:
package com.seanhodges.sandbox;
import android.content.Intent;
import android.net.Uri;
import android.test.AndroidTestCase;
public class SendAnMMS extends AndroidTestCase {
public void testSendingAnMMS() throws Exception {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.putExtra("address", "12345");
intent.putExtra("sms_body", "See attached picture");
intent.putExtra(Intent.EXTRA_STREAM,
Uri.parse("content://media/external/images/thumbnails/0"));
intent.setType("image/png");
// This is added just so the AndroidTestCase launches the
activity
as expected, remove this line in your production code
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getContext().startActivity(intent);
}
}
If the referenced image does not exist, you should get a warning
pop-up when the SMS app launches.
On Wed, Jun 9, 2010 at 3:57 PM, mike <[email protected]> wrote:
> Hi Sean,
>
> didn't get it at all. can you give me an example??
>
> regards,
> Mike
>
> --
> 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
--
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