i want the application to run even when the sim is present, so what shold i do for it.
This is an Android problem and not one of the Arduino, you better ask it on an Android forum (how do I force my Android handy XYZ to use WLAN instead of the mobile network). BTW: my Android is using only the WLAN if it's activated and a network in reach. As yours isn't doing so it may be specially configured or use another OS version. So if you ask your question on the Android forum specify exactly what model you have and which OS version is installed.