Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 6 years ago.
Improve this question
I am doing my uni project to develop an android application. I have decided to develop an application that tells the user the daily times to pray for Muslims. But as I am new to android(and also programming in general) I don't know how to implement this. I have done some research myself and found that some web services provide JSON or XML files to fetch the data or there supposed to be Java Tools/Libs to use. Is there anyone who has developed or has experience in these topics.
please give some advices.
thank you
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.