Problem with fill the sms body in Androids' default sms Acvtivity
I have a problem with opening a default sms Activity.
I'm using the code:Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("sms:"+contact));
intent.putExtra("sms_body", R.string.sms);
startActivity(intent);
开发者_C百科
It happens to fill the number but not body. Have you come across this problem? Or maybe you know other way to open default sms Activity with filled number and body?
EDIT
OK. What I found is that Android has problem with accessing the String in R file. What is the way to convert some R.string to String in code?So there is a way. Sorry for being stupid
intent.putExtra("sms_body", getString(R.string.sms));
精彩评论