Code example for Intent

Methods: createChooserputExtrasetType

0
			mAlertDialog = null;
		} 
	} 
 
	public void recommandToYourFriend(String url, String shareTitle) {
		Intent intent = new Intent(Intent.ACTION_SEND);
		intent.setType("text/plain");
		intent.putExtra(Intent.EXTRA_TEXT, shareTitle + "   " + url);
 
		Intent itn = Intent.createChooser(intent, "分享");
		startActivity(itn);
	} 
 
	/******************************** 【Activity LifeCycle For Debug】 *******************************************/ 
 
	protected void showShortToast(int pResId) {
		showShortToast(getString(pResId));
	} 
 
	protected void showLongToast(String pMsg) {
		Toast.makeText(this, pMsg, Toast.LENGTH_LONG).show();