我想用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