On Jan 14, 9:22 am, Dianne Hackborn <[email protected]> wrote:
> The stock SMS/MMS application handles the SENDTO action with an sms:,
> smsto:, mms:, or mmsto: URI.  I can't guarantee that devices shipping with a
> custom MMS app will also handle these, though.

After experimenting with the SENDTO action and mms: URIs, I think an
extra
intent filter is needed in the stock SMS/MMS application.

Currently the ComposeMessageActivity intent filter for the SENDTO
action and "mms"
scheme is as follows:

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>

Notice that there is currently no provision for mimeType.  This means
that I
can't specify the mimeType of the attachment in the intent when I try
to launch the
mms app via SENDTO. The result of this is that any image I specify
via
intent.putExtra(Intent.EXTRA_STREAM, imageUri) gets ignored.  The
messing app opens
but with no attachment.

If I specify both the URI scheme ("mms") and the Mime Type ("image/
jpeg") via intent.setDataAndType()
with action SENDTO, the intent does not resolve to any activity.

It seems a bit pointless offering support for the "mms" scheme, but
providing no way to
provide an attachment.  To fix this I suggest that a new intent filter
be added to
ComposeMessageActivity as follows:

<intent-filter>
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
</intent-filter>

If that is a workable solution, any chance of including this in the
next release of the stock
SMS/MMS application?

Is there a more appropriate forum to make requests for Android
platform enhancements?

Cheers
Steve
-- 
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