How do I force quit an app while it is on the foreground?
If your USB Debugging is enabled, the you can force close an app using ADB.

adb shell am force-stop com.my.app.package


This command will force close the application.
But you need to know the specific package name. If you are not sure about the package name please google for Application's apk file, u can easily find package name there.
In case you are not familiar with ADB at all please use installer described here