Android调用系统应用程序

Android调用系统应用程序:

1.直接拨打电话:

Intent callIntent = new Intent(Intent.ACTION_CALL, Uri
						.parse("tel:12345678"));
				startActivity(callIntent);


 

2.将电话号传入拨号程序:

Intent dialIntent = new Intent(Intent.ACTION_DIAL, Uri
						.parse("tel:87654321"));
				startActivity(dialIntent);


 

3.调用拨打界面:

Intent touchDialerIntent = new Intent("com.android.phone.action.TOUCH_DIALER");
				startActivity(touchDialerIntent);


 

4.浏览网页:

Intent webIntent = new Intent(Intent.ACTION_VIEW, Uri
						.parse("http://nokiaguy.blogjava.net"));
				startActivity(webIntent);


 

5.向Email客户端传递Email地址:

Uri uri = Uri.parse("mailto:[email protected]");
				Intent intent = new Intent(Intent.ACTION_SENDTO, uri);
				startActivity(intent);


 

6. 发送Email:

Intent sendEmailIntent = new Intent(Intent.ACTION_SEND);

				sendEmailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]
				{ "[email protected]" });
				sendEmailIntent.putExtra(Intent.EXTRA_CC, new String[]
				{ "[email protected]", "[email protected]" });
				sendEmailIntent.putExtra(Intent.EXTRA_SUBJECT,
						"关于Android的两个技术问题");
				sendEmailIntent.putExtra(Intent.EXTRA_TEXT,
						"1. 如何调用其他应用程序中的Activity?\n2. 在应用程序中如果接收系统广播?");

				sendEmailIntent.setType("text/plain");
				startActivity(Intent.createChooser(sendEmailIntent,
						"选择发送消息的客户端"));


 

7.调用联系人页面:

	Intent contactListIntent = new Intent("com.android.contacts.action.LIST_CONTACTS");
				startActivity(contactListIntent);				


 

8.系统设置页面:

Intent settingsIntent = new Intent("android.settings.SETTINGS");
				startActivity(settingsIntent);				


 

9:wifi设置页面:

Intent wifiSettingsIntent = new Intent("android.settings.WIFI_SETTINGS");
				startActivity(wifiSettingsIntent);				


 

10:选择音频程序:

Intent audioIntent = new Intent(Intent.ACTION_GET_CONTENT);
				audioIntent.setType("audio/*");
				startActivity(Intent.createChooser(audioIntent, "选择音频程序"));		


 源码下载地址:http://download.csdn.net/detail/lixiaolei5446/6855389

 

你可能感兴趣的:(Android)