Bob Bob
Bob Bob

Reputation: 154

Creating an Android app for a website based on WordPress

So I'm developing an Android application for a website which is based on WordPress.

I understand that to parse every post, I need to using the concept of JSON parsing. I've been following this tutorial,

http://karanbalkar.com/2014/08/tutorial-85-fetch-data-from-wordpress-posts-using-json-api/

After some research I've discovered that WordPress has a new WP REST API that apparently makes things easier and faster. I can't find any help as to how to use this in an Android app. How different is it from parsing JSON normally as in the above tutorial?

Upvotes: 0

Views: 821

Answers (2)

Kamal Bunkar
Kamal Bunkar

Reputation: 1462

You need a wordpress plugin that will convert entire wordpress website into a json string. Now you can decode the JSON on android using retrofit request. You can create your custom UI on android to show post published on your website. First, you have to install WordPress Rest API v2 on your wordpress. You can get plugin details and other step from this reference link- http://www.blueappsoftware.in/android/blog/get-wordpress-post-in-android-app/

Upvotes: 0

Raed
Raed

Reputation: 698

It is actually the same, the WP API is a HTTP REST API where you can GET and POST Wordpress related objects. The Plugin is still in BETA test tho.

If you just need to read articles from the website and display them in your Android app, maybe using the built in RSS feed would be better for you : www.example.com/feed/ You can parse that feed into your app in a very simple way.
Note that the RSS feed is using XML not JSON like the WP API.

Upvotes: 0

Related Questions