Android Development : Getting data from the web - java

I am beginner in Android development and I am trying to make an app that will simply display the posts on the following website http://www.montgomeryschoolsmd.org/schools/lakelandsparkms/. I need to know how can I display the data from the web into my android app. An example would be appreciated.

The easiest way to display posts into an Android application will be to use JSON data on the web, and read it into a Master Detail Android application.
On the website side, getting the data to display in JSON seems to be the most difficult part of your problem. It would be easy if it was a Wordpress site, as there are plugins that will do this for you.
On the application side, getting the data and parsing it into a master detail flow is a fairly trivial task.
Something like this tutorial may help: http://www.technotalkative.com/android-json-parsing/ or this video https://www.youtube.com/watch?v=0TulTqQM0Cc

You can make a Json request and show data with android views. Or you can download the full or partial page and show it directly in a webview.

Use Jsoup if you're trying to scrape the webpage for data and display it in a UI.

Related

How to do feeding on Android Java?

I'll create a YouTube channel and planning to do an app for my channel. The thing is on my mind, when I upload a new video, I'll put the new video's link in a text on my server, then the app will read the new video is uploaded and fetch link (when the app launched) and will add new videoview to top of old ones.
Like official YouTube app. You know, when a new video uploaded, it comes out automatically.
Thanks for your future helps.
I would start with a custom RecyclerView and follow this guide on how to embed YouTube videos in an android app. If you plan on caching the old YouTube URLs you can ping the database every time they open the app and grab all the new URLs that have been added to your database since the latest cached URL.
How are you going to get the text from server?Are you using POST method or JSON?
In any case once you get the link it's easy.You just have to implement a custom ListView.
Here is link to a article that I found that shows how to do it.
https://medium.com/#v.danylo/implementing-video-playback-in-a-scrolled-list-listview-recyclerview-d04bc2148429#.grvqarw83
Here is another article which shows how to integrate youtube with your app.
https://androidtutorialmagic.wordpress.com/my-mini-project/multiple-youtube-video-in-recyclerviewlistview-in-android/
Also another question like the one you asked.
I want to display multiple video in listview using video but not able to do this

How to connect to Flickr's Search Image API from Android app?

I'm trying to create an Android app using Android Studio, where a user can search for images by typing text into a search bar. the App is supposed to be connected to an image search API, and I chose Flickr. I have never worked with anything like this before, and I was wondering if anyone had any tips on how to start?
Thanks!
You will have to start from Flick API and know the necessary endpoints. Then you also need a networking library like Volley. Finally I'll advice you use JSON for request and response formats.

AJAX equivalent for Android Java

I am currently working on an application for android. My background is web development and I have been using ajax to update information on the screen from a server without reloading the page. I was wondering (and maybe many others as well) what is the equivalent to ajax for android?
The goal is to have the contents of an activity updated or changed with the same asynchronous flow as ajax. Examples of the usage would be things like a messenger or an list updated from a database.
I know this is a newbie question but I hope this might also help others.
Update I am using Volley for server communication
I think AsynkTask with notifydataSetChange in recycler view adapter will be helpful.
Another way is to create a service and call notifydataSetChange if the existing json not equal to the json already at the app.

How to Integrate Waze Traffic Data into Website?

Could anyone show me a way on how to integrate the traffic info app Waze into the website?
I have looked up the previous post but somehow there is no answer to it.
Waze is an application, which offers an actual traffic information. There is also a livemap Waze livemap - where are marks as you can see.
So, I found some site - egaraz and I'm really curious how did they get the data from Waze.
Programming is not my main field but a could still understand some basic php coding.
Could someone suggest me a working solution?
Thanks
a while ago i wrote this project:
https://github.com/Nimrod007/waze-api
you can run this api and get:
get address list from free text
get routes by address (text)
get routes by coordinates
get traffic notification
get navigation instructions
link to full docs:
http://htmlpreview.github.io/?https://github.com/Nimrod007/waze-api/blob/master/docs.html
After googling I found that WAZE has an API for developers which you can use. They have given sample code only for android and ios. I am not sure about php. Check this link from waze developer - http://www.waze.com/dev/documentation/

Better way to develop a remote database driven android app?

i have a wordpress blog hosted over my personal shared hosting.Now i want to develop an android app for that blog so the users can use the mobile app to see what i am writing on my blog.
Like for example you can take mashable.com android app.
so basically i have experience in programming android aap but i am just asking this so i can code it in a better way.
i have 3 idea to do this now:
1.Use rss feed of my blog and parse it and display the contents but it has a issue that rss only display most latest contents.So whether i need to store the feed contents timely on android device so a user can view the previous most content also.
But i think it's not a good idea because it will unnecessarily increase the size of database and make diff copies on every device.
2.Just simply use complete java code to pull data from my web mysql database as per the user request and just display it over the screen without storing it locally on android device.
3.Develop some sort of API solution on my web server then send the data in json or xml format so i can use it on my android device(via java) without bothering to connecting to mysql server as a core part because that part already done by on web server and my api already sending data in required format.
So these are 3 idea i have now.So please suggest me a better one form these three or you can give any other idea.
I am asking this question because previously i never programmed this sort of mobile aap where i need to pull the data from remote server.
-Thanks
You can simply install WordPress Mobile Pack to display Mobile site of your wordpress blog/site
Or
You can check this link to find out other plugins: 11 Ways to Create a Mobile Friendly WordPress Site
Now, If you want to create an app then you can simply implement it by using WebView.

Categories

Resources