我正在尝试执行以下代码:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
sendSMS();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
public void sendSMS()
{
String phoneNumber = "NumberToSend";
String message = "Hello";
SmsManager smsMgr = SmsManager.getDefault();
smsMgr.sendTextMessage(phoneNumber, null, message, null, null);
}
}
它工作得很好,但有没有办法更改邮件的标题,标题会显示数字,我想将其更改为文本。
请帮忙