在Android的MMS不工作使用Intent.ACTION_SEND [英] MMS in android not working using Intent.ACTION_SEND
本文介绍了在Android的MMS不工作使用Intent.ACTION_SEND的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何发送彩信的机器人?
How can i send an MMS in android ?
我使用的UI code如下:
My code using UI as follows :
Intent intent = new Intent(Intent.ACTION_SEND);
intent.putExtra("address", "5556");
intent.putExtra("sms_body", "Gudmng !!");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Uri uri = Uri.fromFile(new File("/sdcard/sky.png"));
intent.putExtra(Intent.EXTRA_STREAM, uri); // imageUri set
intent.setType("image/*")
startActivity(intent);
但仍是异常发送彩信
But still the exception in sending MMS
ERROR/HierarchicalStateMachine(68): TetherMaster - unhandledMessage: msg.what=3
任何帮助吗?
Any Help?
推荐答案
我不知道你的code中的问题,但我用这个和它的作品:
I'm not sure what the problem with your code is, but I have used this and it works:
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType("image/jpg");
sendIntent.setClassName("com.android.mms", "com.android.mms.ui.ComposeMessageActivity");
sendIntent.putExtra("sms_body", "hello");
sendIntent.putExtra(Intent.EXTRA_STREAM, uri);
startActivityForResult(sendIntent, 0);
也许你可以根据自己的需要将这一和改变它。
Maybe you can incorporate this and change it according to your needs.
这篇关于在Android的MMS不工作使用Intent.ACTION_SEND的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文