How is the Muslim Prayer time is calculated in an android application? [closed] How is the Muslim Prayer time is calculated in an android application? [closed] json json

How is the Muslim Prayer time is calculated in an android application? [closed]


The Xhanch API returns the data to you in JSON/XML format.

If you want XML,

http://api.xhanch.com/islamic-get-prayer-time.php?lng=30&lat=30&yy=2013&mm=9&gmt=4

If you want JSON,

http://api.xhanch.com/islamic-get-prayer-time.php?lng=30&lat=30&yy=2013&mm=9&gmt=4&m=json

Check the documentation for the significance of each of the request parameters.

You can make a call to the API using KSOAP 2 library.

This is how the JSON response looks like

{"1":{"fajr":"05:16","sunrise":"06:36","zuhr":"13:00","asr":"16:34","maghrib":"19:23","isha":"20:40"},"2":{"fajr":"05:16","sunrise":"06:37","zuhr":"13:00","asr":"16:34","maghrib":"19:22","isha":"20:39"},"3":{"fajr":"05:17","sunrise":"06:38","zuhr":"13:00","asr":"16:33","maghrib":"19:21","isha":"20:38"},....}

Once you get the data in JSON format, all you need to do is parse the information and display it in your application.