Code example for Intent

Methods: addCategory

0
		return super.onOptionsItemSelected(item);
	} 
 
	protected void exit() { 
		TwitterService.unschedule(this);
		Intent i = new Intent(Intent.ACTION_MAIN);
		i.addCategory(Intent.CATEGORY_HOME);
		startActivity(i);
	} 
 
	protected void launchActivity(Intent intent) {
		// TODO: probably don't need this result chaining to finish upon logout. 
		// since the subclasses have to check in onResume. 
		startActivityForResult(intent, REQUEST_CODE_LAUNCH_ACTIVITY);
	} 
 
	protected void launchDefaultActivity() { 
		Intent intent = new Intent();
		intent.setClass(this, TwitterActivity.class);
		startActivity(intent);
	}