I have an app that shows next prayer times, I need the formula to extract that time (remaining hours/mins) from the app to my theme

This is not possible unless the app itself exports the data or make it available somehow, if there is a web service that shows this via JSON / XML than you can probably use WG(), try asking in the G+ community if anyone has found a way to do this.

i found a solution for the prayer time if you want. you dont need an app for that

Please share your solution