/* 建构Intent对象,指定开启对象为mService1服务 */
Intent i = new Intent( EX06_04.this, mService1.class );
/* 设定新TASK的方式 */
i.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
/* 以startService方法启动Intent */
Intent i = new Intent( EX06_04.this, mService1.class );
/* 设定新TASK的方式 */
i.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
/* 以startService方法启动Intent */
startService(i);
/* 构造Intent对象,指定欲关闭的对象为mService1服务 */
Intent i = new Intent( EX06_04.this, mService1.class );
/* 以stopService方法关闭Intent */
stopService(i);