When running "clear recent apps", you are in effect killing all unprotected applications. To keep your app running you must add it to the protected apps list before clearing recent apps.
You can add your application to the protected list through App Manger Profile.
Actually, what I want to do is after clear the recent task, the home launcher will be killed instead of going back to home launcher. After several trying, home launcher will still there if i kill the recent task.
I'm not sure I follow what you are trying to accomplish. Clear recent apps, should not kill the home screen/launcher, if it did, the home screen would relaunch as soon as someone hit the home button. Are you trying to make your application run in a kiosk mode, where the user can not get back to the home screen?
This is what am I trying. When my launcher is launched, I don't want the default launcher stay in background. It will return to default launcher while user long press and select it.
Is there any solution that can kill default launcher or prevent it relaunch?
You could use EHS ( Enterprise Home Screen) to lock your application into kiosk mode.
If you are creating a launcher/home screen, your AndroidManifest.xml must have the following in your activity definition.
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
Once thats done and it is installed on the device, press the home button. I dialog will popup asking which home screen you want to use by default. Select your app, then reboot the
device. On boot your launcher will start instead of the stock launcher. The stock launcher will never run and will not be in the recent apps list.
Word of Caution:
In order to get back to the stock launcher, you have to go to settings > apps > (your app) > clear defaults. That means you must add a way to launch settings to your app if you want to get out of it. If ADB is enabled you could also just use adb uninstall "your apk" to remove your app, which would force the default launcher to take back over.