Im a beginner in android programming though i've built few apps in my early days so i know the basics.
I need to make app that shows wordpress site and can list articles in categories and search that categories and put comments on articles. Ive found out that with webview i can submit forms so i can put comments on articles, but im struggling in finding plugins that can give me list of site categories as xml or json. How can i do that? What is the way to search site categories (menu) on android?
Ivan Kesic wrote:Hmm, i have actually meant a wordpress plugin, that can get me a json or xml for a category that already exist on webpage. Also webview should be able to set on screen of my app any xml or json that i want, right?
I'm bit confused what exactly you are looking for, but here goes:
As I understand it, you want to write a native android app that displays wordpress in a custom way.
So if your app wants *programmatic* access to some wordpress blog's posts or categories or tags, you can use Wordpress XML-RPC API. Specifically, the Posts API and "taxonomy" APIs.
The term "taxonomy" may look confusing, but in the context of wordpress, taxonomy refers to any scheme that organizes blog posts... like "Categories" and "tags".
What confuses me is why WebView is in picture here. For viewing the blog post body, you need webview, but I don't see why you'd need it for showing list of categories/tags/comments.
I thought that ill use webview for content, but now i see i don't need it. I only need these plugins. There is just one more question, i haven't got a wordpress blog, but a website that has its own domain and wordpress framework installed. Can this and/or json api work on that kind of wordpress website?
Ivan Kesic wrote:I thought that ill use webview for content, but now i see i don't need it. I only need these plugins.
XML-RPC is not a wordpress plugin. It's part of the base Wordpress platform.
Which is a good thing, because it means just about every wordpress blog (whether self-hosted or hosted on wordpress.com)
will support it, unless the blog author has explicitly disabled it (which is possible and usually done for security reasons; XML-RPC has poor authentication protection).
There is just one more question, i haven't got a wordpress blog, but a website that has its own domain and wordpress framework installed. Can this and/or json api work on that kind of wordpress website?
Yes, it'll work even for a self-hosted wordpress blog which is behind some domain like "http://www.<my-domain>.com/blog". You can try easily using curl tool to check whether it works for your particular blog; URL is usually "http://<your-wordpress-blog-url>/xmlrpc.php". If it doesn't work, then either XML-RPC has been disabled by blog administrator, or its URL has been changed for security reasons.
Note that it gives only XML responses, not JSON responses.