我想用android 2.2发送消息(短信/彩信)。首先,我做的意图选择器与ACTION_SEND来选择使用哪一个:如何发送消息在android 2.2?
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, Resources.getString("InvitationSubject", getBaseContext()));
String body = Resources.getString("InvitationBody", getBaseContext()) + Local.User.FirstName;
intent.putExtra(Intent.EXTRA_TEXT, body);
startActivity(Intent.createChooser(intent, "Invite friends"));
但在这种情况下,选择节目“蓝牙消息,Google +和Gmail的”。我只想显示消息或其他消息应用程序。
我在sdk文档中看到有一个新的CATEGORY_APP_MESSAGING要使用,但它只能在API级别15中使用。我必须保持API级别8.有没有办法做到这一点?
SEND_SMS无须许可。 – Tarun