Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
By not doing a factory reset.Factory Data reset will remove everything and uninstall the third party apps
So, how can i prevent my app getting uninstalled?

Don't do a factory reset.
Do you mean, how can you restore your apps after a factory reset? Your paid apps will be listed when you go to the Market and can be downloaded again without charge.
Free apps can also be downloaded but you'll have to look them up yourself. Some people use Appbrain to make the process easier.
There are also backup apps nowadays that don't require root, but I have not tried any.