Send and Receive JSON between Android and PHP Web Service
|
|
 |

|
I receive sockettimeout exception. What must I do ? please help
|
|
|
|
|

|
Hey!
I have to use this code for an android application.
(with eclipse)
at this row I have problems:
responseBody = httpclient.execute(httppost, responseHandler);
If I write:
Toast.makeText(this, "this shows", Toast.LENGTH_LONG).show();
responseBody = httpclient.execute(httppost, responseHandler);
Toast.makeText(this, "this not", Toast.LENGTH_LONG).show();
can you help me?
|
|
|
|

|
Thank you very much for your tutorial, it's really helpful!
Btw, I got some problems and hope you could give me guidance.
1) When I pressed on "Receive" Button, a toast text pop up and said that request failed - HttpHostConnectException - connection to localhost refused.
2) The "Send" Button has no response.
Thanks.
|
|
|
|

|
More screen shots and a bit more detail would be helpful.
|
|
|
|

|
This was the Best and To the point description available all over internet for JSON sending and receiving on web end via android. HATS OFF!!
|
|
|
|

|
This tutorial is very useful, however I spotted something ambiguous:
request.setEntity(new ByteArrayEntity(json.toString().getBytes("UTF8")));
request.setHeader("json", json.toString());
You are practically passing the content of the json through the header and not the entity. If you remove your setEntity line, this method is still going to work, although it doesn't seem like a good practice to do it this way.
|
|
|
|

|
Hi Hamdy Ghanem,
It is very good article.
Thanks
soft Developer india
|
|
|
|

|
Please tell me the databases and tables required in the web end
bilal
|
|
|
|

|
I am completely new to the web services.i have lot of doudts i will be glad if u kindly reply to this message.I downloaded the project and imported that into my ecllipse.should i need to create a dynamic web project for this or is it ok if i just import this like the same.I am using a Jam server in the different computer and accessing the project.should i need to have both the projects in the same computer.the computers are connected in LAN.I have no errors in cone but i got a error on the project with an exlamatory mark.So please tell me what to do.
|
|
|
|

|
Hi,
I got this error seems like is lacking 3 jar files
Description Resource Path Location Type
Project 'TestProo' is missing required library: 'D:\Hamdy\Working Folder\android-sdk-windows\google-gson-1.7.1\gson-1.7.1-javadoc.jar' TestProo Build path Build Path Problem
Project 'TestProo' is missing required library: 'D:\Hamdy\Working Folder\android-sdk-windows\google-gson-1.7.1\gson-1.7.1-sources.jar' TestProo Build path Build Path Problem
Project 'TestProo' is missing required library: 'D:\Hamdy\Working Folder\android-sdk-windows\google-gson-1.7.1\gson-1.7.1.jar' TestProo Build path Build Path Problem
Can you guide me? Thanks
|
|
|
|

|
i am getting 2 errors
1st - when the app starts it shows native typeface not found
2nd - when i click on receive button i get java.net.SocketException Permission Denied
Please help asap!
|
|
|
|
|

|
Thanx for this wonderful tutorial.
I have read through the source code.
I downloaded the source.
I created a database called test on my localhost.
I then created a table called users with idusers as the primary key and UserName and FullName as the other fields.
I then run the code successfully though many imports in main.java are not used.
I get the error, Activity Change Numbers (in Application Change Numbers) is not responding
What should i do?
Wish there was a demo of how it works exactly.
|
|
|
|

|
how can i make lie between asp.net and android to send and receve request with Data
|
|
|
|

|
Thanks a lot! Great contribution
|
|
|
|

|
Hello,
I am trying out this example, Do i need to create a table within test db and also what field are required.
Thank you
kumar
|
|
|
|

|
hi thank you for grate code, I have Error in Android side
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonParser;
already install the google plugin but still I have error. pls help me !
|
|
|
|

|
Great! Concise and well written.
Things to make this a 5 star article:
--Screenshots of before and after each code block is run
--Additional commenting explaining what the code is doing
Again, thank you!
|
|
|
|
|
 |
|
|
Last Updated 12 Oct 2011 |
Advertise |
Privacy |
Terms of Use |
Copyright ©
CodeProject, 1999-2013