此代码适用于原生Android系统的纯谷歌设备。但在HTC Sense的设备列表中没有MMS应用程序,我不知道摩托罗拉模糊等:Android:在任何Android设备上是否有通用的方式发送彩信?
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("image/png");
emailIntent.putExtra(Intent.EXTRA_STREAM, uri);
context.startActivity(Intent.createChooser(emailIntent, context.getString(R.string.send_intent_name)));
此代码工作的HTC Sense的而不是从选配,我真正需要的:
Intent sendIntent = new Intent("android.intent.action.SEND_MSG");
sendIntent.putExtra(Intent.EXTRA_STREAM, uri);
sendIntent.setType("image/png");
context.startActivity(sendIntent);
但我不知道如何将此代码示例结合在一起,我不知道如何以编程方式确定Htc Sense ui。支持不同类型的设备是否正确?
谢谢你的回答。
你见过[这个问题] [1] ?它有一些示例代码。 [1]:http://stackoverflow.com/questions/2972845/i-want-send-image-through-using-mms-in-android/2973016#2973016 – EboMike 2011-09-22 21:45:42
@EboMike我看你是创造EboBirthday的家伙谢谢!这是一个非常棒的程序,自它首次发布以来一直在使用它。 – JPM 2011-11-01 23:33:09
@JPM我是,谢谢JPM :) – EboMike 2011-11-01 23:52:21