清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
发送短信:
1 2 3 4 5 6 | String body= "this is sms demo" ; Intent mmsintent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts( "smsto" , number, null )); mmsintent.putExtra(Messaging.KEY_ACTION_SENDTO_MESSAGE_BODY, body); mmsintent.putExtra(Messaging.KEY_ACTION_SENDTO_COMPOSE_MODE, true ); mmsintent.putExtra(Messaging.KEY_ACTION_SENDTO_EXIT_ON_SENT, true ); startActivity(mmsintent); |
1 2 3 4 5 6 7 8 9 10 11 | StringBuilder sb = new StringBuilder(); sb.append( "file://" ); sb.append(fd.getAbsoluteFile()); Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts( "mmsto" , number, null )); // Below extra datas are all optional. intent.putExtra(Messaging.KEY_ACTION_SENDTO_MESSAGE_SUBJECT, subject); intent.putExtra(Messaging.KEY_ACTION_SENDTO_MESSAGE_BODY, body); intent.putExtra(Messaging.KEY_ACTION_SENDTO_CONTENT_URI, sb.toString()); intent.putExtra(Messaging.KEY_ACTION_SENDTO_COMPOSE_MODE, composeMode); intent.putExtra(Messaging.KEY_ACTION_SENDTO_EXIT_ON_SENT, exitOnSent); startActivity(intent); |