Android development: Getting data from WordPress - android

I'm making an android app for displaying some school events(Title of the event and a posted picture of the event).
The only thing I need for the app is getting data(String for title, ImageView for the picture)from a server.
The answer of this post, Android Development : Getting data from the web, seems to be the easiest and the most straight forward way I could find.
"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."
I know almost nothing about database, networking, wordpress, and JSON. :(
I have made an wordpress account and install the JSON plugin and wordpress web server plugin. But that's how far I could get :(
My idea is
in the wordpress blog site: make a post for each new event. The title of the post is the event title and the content of the post just a picture, which is a post about the event.
in the app side: add a synchronize task within the onCreate function, so when the app is opened, it will check if there's any new post in the blog. If there's any, it will get the blog title and add to the listView, and get the picture inside of the blog and create a new layout in which has a ImageView for holding the picture.
As I said, I know nothing about web service and networking.
I have no clue about how to check if there's any new post in the blog comparing with those events already in the app.....
These two examples are the closet I could get.
http://android.programmerguru.com/android-webservice-example/
http://wordpress.org/support/topic/phonegap-android-app-built-around-json-api (I don't understand this one! :/)
Please help! This thing is giving me a big headache! And it's the last step I need for the app!
Any help or sample code will be greatly appreciated!!
And most importantly, Merry Christmas, everyone! XD

There is Wordpress plug-in called JSON-API it gives you ability to access every object of Wordpress( post ,page ,category.. etc ) in the form of JSON. you can use any rest client like volley from google, retrofit from Square or build your won to access wordpress data.
install Wordpress plug-in
http://wordpress.org/plugins/json-api/
for sample code you can look Wordpress for android source code on github
https://github.com/wordpress-mobile/WordPress-Android

I ended up with writing my own JSON.

Related

how to get JSON of WIX web site data

I want to make an Android and iOS app for a site dsstrucks.com
The thing is i am not able to get the JSON data of the site. Is there a way by which i can get JSON of WIX Site so that i can use it to create an App.
I want a way by which i can get all latest updates also, just like the woocommerce rest api. Or is there a way i can create my own API for this ?
I have tried POST MAN to check GET requests and still no luck. Any minor or major help would be great full.
Thank in Advance

android app development with live content fetching

I am interested in making android app like crickbuzz that will fetch live content from server and also there is option of like and comment for users for feedback. So, can anyone tell that how to implement this i.e (how to fetch data from server) how that data will fit in app(confused about this how data get fit in instagram app means profile, home, search tab)
thanks
I suggest you check out this links
Android, PHP & MySQL
Fetch Data From Server
Ok, let's break it down:
The data is obtained from the server using http requests. It is usually received in the form of JSON String, basically a ordered, human-readable data format which is easy to read and parse.
On the app side, you need to implement the layout, which is done in xml and Java. You also need some logic which will obtain the data with the aforementioned requests, parse it, turn into Java Objects and put everything into the layout.
The process is not really complex, could be completed by a single person, but you will need experience, time and good architectural decisions.
If this is your first time with Android app programming, do some tutorials (especially ones that cover networking), learn some libraries (Volley, Retrofit, org.json, RXJava, Picasso will be really useful for what you ask about) and code several small apps from start to end. After that you may be ready to tackle the app you described :-)

Set up a server and get feed from it in android

This may not be the type of question I am supposed to ask here but I don't have anywhere else to go. I want to make an android application which gets feed from a web-server and displays in the application. It will be kind of a newspaper app. I have done my share of work: I know android application developemnt: have made some apps. Also, I have an idea of UI: a listview with the feeds and then on selecting an element I will open another activity with the complete feed. What I wanted to know is:
How to set-up a server for this?
How to request?
Can I set-up a free server?
I dont want to use GCM as I don't think it allows sending pictures. Plus it allows small data to be sent. Also, I have no knowledge about the 3rd party server I may need to create for this.
I would want to post both text and photos (combined makes a post, total of around 10 posts) from the server. Please dont close as not a question. Any link, tutorial will be highly appreciated. For server side coding, I know php, .net. I have never coded in java for a server, but I can learn it.
Please follow following steps to get your project done.
Set up any php or Java or .Net Server (If you are aware of any of these web technologies)
After you set up server you need to make web service which will work as mediator to transfer data between your server and mobile.
Webservice response will be either in JSON or XML
Generate response according to your need and parse them on android side.
Display in listview :) :)
You can use JBOSS for your server, and do a Java Server with Webservices.
In your webservices you'll have a service that get all the feeds, and maybe another that request the complete feed...
Your "language" between the Android app and the Server, you can use XML with SOAP (ksoap2 for Android), or you can try JSON (I never used, but I will 'cause we goona need use in my service).
You can try find another free server side, but I think the SOAP is important in most of the servers to "talk" with your app.
I hope helped you.
[]s
Bertan

App Reading From SQL Server Web Service

I am in the process of creating an Android application which I want to use to execute a web service on my SQL server which in turn runs a stored procedure.
Having never completed a project like this before, I would like to know what the best way to go about this is?
I.e.
Displaying the SQL results
Reading from the web service
Adding password protection
I've developed apps before, but never SQL - related.
From doing some research I noted the need for a web service and created one, it's the process of running my app to read from it which I would like guidance with. Even a link to a helpful tutorial would be great. Thanks.
EDIT
To be more specific on the display.
Currently the stored procedure is displayed through crystal reports, however I have no need for 'drill - downs' or any functionality other than to actually view.
Something similar without the functionality would be fine.
I would recommend KSOAP with a SOAP webservice for proof of concept/tech demo http://seesharpgears.blogspot.com/2010/11/basic-ksoap-android-tutorial.html
or use the built-in JSON parser with a restful/json webservice
How to call a json webservice through android
Perhaps this link can help you, it has a useful video on the subject and detailed information.
Another link Comsuming WCF Services With Android
And also maybe this could help: Android Web Service MyWeather

Accessing a .NET web service via Android using JSON

I am a seasoned ASP.NET developer but a novice Android developer who is just getting started.
The first page in my new app is a login page. I would like to pass a username and password to my web service authentication method from my android app. I would like to employ JSON since, from what I've read, would be the most simple and clean method of transmitting data to a mobile device.
I've been searching around and trying to find sample code or syntax that would show me how to accomplish this but it's been difficult.
Here is a nice example exactly how to do it: http://www.geekmind.net/2009/11/android-simple-httpclient-to.html
It is an easy solution and it works.
Here is the thing you need to know
http://android.programmerguru.com/android-json-web-service-tutorial/
and try this also
http://android.programmerguru.com/how-to-call-asp-net-web-service-in-android/
Hope this will help you :)

Categories

Resources