Android:有没有通用的方式在任何Android设备上发送彩信?

shi*_*dev 24 android mms android-intent htcsense

此代码适用于具有本机android系统的普通google设备.但是在htc感应设备的列表中没有MMS应用程序,我不知道摩托罗拉模糊等:

    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)));
Run Code Online (Sandbox Code Playgroud)

这段代码适用于htc意义,但不适用于Chooser,我真正需要的是:

    Intent sendIntent = new Intent("android.intent.action.SEND_MSG");
    sendIntent.putExtra(Intent.EXTRA_STREAM, uri);
    sendIntent.setType("image/png");
    context.startActivity(sendIntent);
Run Code Online (Sandbox Code Playgroud)

但我不知道如何将这些代码示例组合在一起,我不知道如何以编程方式确定Htc Sense ui.是支持不同类型设备的正确方法吗?

谢谢你的回答.

Jam*_*war 1

感觉,尤其是旧版本是一种痛苦。还有webview控件也有一堆问题。根据消息量,您可以尝试使用诸如亚马逊简单通知服务之类的网络服务来发送短信:http://aws.typepad.com/aws/2011/11/amazon-simple-notification-service-now-supports-sms .html 它不是 android 解决方案,但它可能有效。