WEB开发网
开发学院手机开发Android 开发 Android intent intent-filter intent filer 阅读

Android intent intent-filter intent filer

 2010-10-21 01:38:16 来源:WEB开发网   
核心提示:Java代码Uri smsUri = Uri.parse("tel:100861");returnIt = new Intent(Intent.ACTION_VIEW, smsUri);returnIt.putExtra("sms_body", "shenrenkui&

Java代码

Uri smsUri = Uri.parse("tel:100861");

returnIt = new Intent(Intent.ACTION_VIEW, smsUri);

returnIt.putExtra("sms_body", "shenrenkui");

returnIt.setType("vnd.android-dir/mms-sms");

Uri smsUri = Uri.parse("tel:100861");

returnIt = new Intent(Intent.ACTION_VIEW, smsUri);

returnIt.putExtra("sms_body", "shenrenkui");

returnIt.setType("vnd.android-dir/mms-sms");

11,直接发邮件

Java代码

Uri smsToUri = Uri.parse("smsto://100861");

returnIt = new Intent(Intent.ACTION_SENDTO, smsToUri);

returnIt.putExtra("sms_body", "shenrenkui");

Uri smsToUri = Uri.parse("smsto://100861");

returnIt = new Intent(Intent.ACTION_SENDTO, smsToUri);

returnIt.putExtra("sms_body", "shenrenkui");

12,发彩信

Java代码

Uri mmsUri = Uri.parse("content://media/external/images/media/23");

returnIt = new Intent(Intent.ACTION_SEND);

returnIt.putExtra("sms_body", "shenrenkui");

returnIt.putExtra(Intent.EXTRA_STREAM, mmsUri);

returnIt.setType("image/png");

Uri mmsUri = Uri.parse("content://media/external/images/media/23");

returnIt = new Intent(Intent.ACTION_SEND);

returnIt.putExtra("sms_body", "shenrenkui");

returnIt.putExtra(Intent.EXTRA_STREAM, mmsUri);

returnIt.setType("image/png");

用获取到的Intent直接调用startActivity(returnIt)就ok了。

上一页  1 2 3 4 5 

Tags:Android intent intent

编辑录入:coldstar [复制链接] [打 印]
赞助商链接