When you will click on any title then it will open another activity and display the title and content of that particular post.įor fetching the data from internet I have used Volley library. In this app I have fetched titles of some posts and displayed them in a list on one activity.
WORDPRESS ANDROID APP SOURCE CODE HOW TO
How to Make Android App for WordPress Blogīelow I have shared the example for making simple app. You can learn more about it by reading API documentation at below link. I hope now you got basic idea of using WP REST API.
Just make sure you use valid field name.Like if you want to fetch id, title and content then it can be done using following URL. You can also fetch other fields along with id and title by just adding them in the URL.For example you want to fetch only post’s id and title then it can be done by using following URL. So with the help of REST API – Filter Fields plugin you can filter few fields. As you have seen in above JSON data that there are several fields that we don’t require.You can fetch any particular post by its id.For fetching specified number of posts you can use post-per-page filter.For a real example you can see the URL with my blog.You can fetch information about all the post on your blog by following URL.
WORDPRESS ANDROID APP SOURCE CODE INSTALL
Just go the links that I have given above to download and then install these plugins on your blog. So using this plugin we can filter the data to decrease its size.
To get the Android App for your WordPress Blog CLICK HERE.
If you are looking for a complete app with all the standard features like, PUSH NOTIFICATION, BOOKMARKS, SOCIAL SHARING etc. Note: This tutorial is about creating a very basic Android APP using WP REST API. So in this tutorial I will teach you to make a very basic Android app for WordPress blog or website using WP REST API. Using this API we can easily retrieve our WordPress site’s data like posts, media, users, etc in JSON format by just sending HTTP request. It allows developers to create apps that can easily integrate with WordPress platform. WP REST API is one of the best features added to WordPress. It is the most popular blogging platform as more than 60 million websites are running on it. In past few years WordPress has grown so much. Hello, guys welcome to WordPress to Android App Tutorial.