问题描述
我需要发送彩信。进入我的英雄本code长得难看,但作品:
I need to send MMS. Into my hero this code looks ugly but works:
Intent sendIntent = new Intent("android.intent.action.SEND_MSG");
sendIntent.putExtra("address", toText);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "subject");
sendIntent.putExtra("sms_body", textMessage);
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(url));
sendIntent.setType("image/jpeg");
startActivity(sendIntent);
不过,在我看来,对其他设备不工作的。我想直接发送到主消息应用程序,没有任何的选择(当然是更好的解决方案 - 直接从我的应用程序)。因为不知道,所有的人会处理得当。如果任何人都可以推荐任何第三方库,我会AP pretiate。
But it seems to me that on the other devices it doesn't work at all.I want to send directly to main messaging app without any choices(the better solution of course - direct from my app). Because not sure that all of them would handle it properly.If anybody could recommend any third-party library I'll be appretiate.
推荐答案
发送您的应用程序?
startActivity之前,您可以
before startActivity, you can
intent.setClassName(你的包名,你的类名);
intent.setClassName("your package name", "your class name");
startActivity(意向);
startActivity(intent);
这篇关于发送彩信到不同的Android设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!